var pn = Object.defineProperty;
var wn = (e, i, t) => i in e ? pn(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t;
var Y = (e, i, t) => (wn(e, typeof i != "symbol" ? i + "" : i, t), t);
/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
function pe(e) {
  let i = e.length;
  for (; --i >= 0; )
    e[i] = 0;
}
const bn = 0, Ei = 1, mn = 2, yn = 3, xn = 258, Ot = 29, De = 256, Se = De + 1 + Ot, _e = 30, Lt = 19, vi = 2 * Se + 1, ie = 15, et = 16, kn = 7, Rt = 256, Si = 16, Ai = 17, Ti = 18, wt = (
  /* extra bits for each length code */
  new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0])
), Ke = (
  /* extra bits for each distance code */
  new Uint8Array([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13])
), En = (
  /* extra bits for each bit length code */
  new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7])
), zi = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), vn = 512, W = new Array((Se + 2) * 2);
pe(W);
const ke = new Array(_e * 2);
pe(ke);
const Ae = new Array(vn);
pe(Ae);
const Te = new Array(xn - yn + 1);
pe(Te);
const Nt = new Array(Ot);
pe(Nt);
const We = new Array(_e);
pe(We);
function tt(e, i, t, n, r) {
  this.static_tree = e, this.extra_bits = i, this.extra_base = t, this.elems = n, this.max_length = r, this.has_stree = e && e.length;
}
let Oi, Li, Ri;
function it(e, i) {
  this.dyn_tree = e, this.max_code = 0, this.stat_desc = i;
}
const Ni = (e) => e < 256 ? Ae[e] : Ae[256 + (e >>> 7)], ze = (e, i) => {
  e.pending_buf[e.pending++] = i & 255, e.pending_buf[e.pending++] = i >>> 8 & 255;
}, I = (e, i, t) => {
  e.bi_valid > et - t ? (e.bi_buf |= i << e.bi_valid & 65535, ze(e, e.bi_buf), e.bi_buf = i >> et - e.bi_valid, e.bi_valid += t - et) : (e.bi_buf |= i << e.bi_valid & 65535, e.bi_valid += t);
}, M = (e, i, t) => {
  I(
    e,
    t[i * 2],
    t[i * 2 + 1]
    /*.Len*/
  );
}, Di = (e, i) => {
  let t = 0;
  do
    t |= e & 1, e >>>= 1, t <<= 1;
  while (--i > 0);
  return t >>> 1;
}, Sn = (e) => {
  e.bi_valid === 16 ? (ze(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : e.bi_valid >= 8 && (e.pending_buf[e.pending++] = e.bi_buf & 255, e.bi_buf >>= 8, e.bi_valid -= 8);
}, An = (e, i) => {
  const t = i.dyn_tree, n = i.max_code, r = i.stat_desc.static_tree, a = i.stat_desc.has_stree, s = i.stat_desc.extra_bits, l = i.stat_desc.extra_base, h = i.stat_desc.max_length;
  let o, f, u, _, d, g, O = 0;
  for (_ = 0; _ <= ie; _++)
    e.bl_count[_] = 0;
  for (t[e.heap[e.heap_max] * 2 + 1] = 0, o = e.heap_max + 1; o < vi; o++)
    f = e.heap[o], _ = t[t[f * 2 + 1] * 2 + 1] + 1, _ > h && (_ = h, O++), t[f * 2 + 1] = _, !(f > n) && (e.bl_count[_]++, d = 0, f >= l && (d = s[f - l]), g = t[f * 2], e.opt_len += g * (_ + d), a && (e.static_len += g * (r[f * 2 + 1] + d)));
  if (O !== 0) {
    do {
      for (_ = h - 1; e.bl_count[_] === 0; )
        _--;
      e.bl_count[_]--, e.bl_count[_ + 1] += 2, e.bl_count[h]--, O -= 2;
    } while (O > 0);
    for (_ = h; _ !== 0; _--)
      for (f = e.bl_count[_]; f !== 0; )
        u = e.heap[--o], !(u > n) && (t[u * 2 + 1] !== _ && (e.opt_len += (_ - t[u * 2 + 1]) * t[u * 2], t[u * 2 + 1] = _), f--);
  }
}, Ii = (e, i, t) => {
  const n = new Array(ie + 1);
  let r = 0, a, s;
  for (a = 1; a <= ie; a++)
    r = r + t[a - 1] << 1, n[a] = r;
  for (s = 0; s <= i; s++) {
    let l = e[s * 2 + 1];
    l !== 0 && (e[s * 2] = Di(n[l]++, l));
  }
}, Tn = () => {
  let e, i, t, n, r;
  const a = new Array(ie + 1);
  for (t = 0, n = 0; n < Ot - 1; n++)
    for (Nt[n] = t, e = 0; e < 1 << wt[n]; e++)
      Te[t++] = n;
  for (Te[t - 1] = n, r = 0, n = 0; n < 16; n++)
    for (We[n] = r, e = 0; e < 1 << Ke[n]; e++)
      Ae[r++] = n;
  for (r >>= 7; n < _e; n++)
    for (We[n] = r << 7, e = 0; e < 1 << Ke[n] - 7; e++)
      Ae[256 + r++] = n;
  for (i = 0; i <= ie; i++)
    a[i] = 0;
  for (e = 0; e <= 143; )
    W[e * 2 + 1] = 8, e++, a[8]++;
  for (; e <= 255; )
    W[e * 2 + 1] = 9, e++, a[9]++;
  for (; e <= 279; )
    W[e * 2 + 1] = 7, e++, a[7]++;
  for (; e <= 287; )
    W[e * 2 + 1] = 8, e++, a[8]++;
  for (Ii(W, Se + 1, a), e = 0; e < _e; e++)
    ke[e * 2 + 1] = 5, ke[e * 2] = Di(e, 5);
  Oi = new tt(W, wt, De + 1, Se, ie), Li = new tt(ke, Ke, 0, _e, ie), Ri = new tt(new Array(0), En, 0, Lt, kn);
}, Ci = (e) => {
  let i;
  for (i = 0; i < Se; i++)
    e.dyn_ltree[i * 2] = 0;
  for (i = 0; i < _e; i++)
    e.dyn_dtree[i * 2] = 0;
  for (i = 0; i < Lt; i++)
    e.bl_tree[i * 2] = 0;
  e.dyn_ltree[Rt * 2] = 1, e.opt_len = e.static_len = 0, e.sym_next = e.matches = 0;
}, Zi = (e) => {
  e.bi_valid > 8 ? ze(e, e.bi_buf) : e.bi_valid > 0 && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0;
}, Pt = (e, i, t, n) => {
  const r = i * 2, a = t * 2;
  return e[r] < e[a] || e[r] === e[a] && n[i] <= n[t];
}, nt = (e, i, t) => {
  const n = e.heap[t];
  let r = t << 1;
  for (; r <= e.heap_len && (r < e.heap_len && Pt(i, e.heap[r + 1], e.heap[r], e.depth) && r++, !Pt(i, n, e.heap[r], e.depth)); )
    e.heap[t] = e.heap[r], t = r, r <<= 1;
  e.heap[t] = n;
}, Ft = (e, i, t) => {
  let n, r, a = 0, s, l;
  if (e.sym_next !== 0)
    do
      n = e.pending_buf[e.sym_buf + a++] & 255, n += (e.pending_buf[e.sym_buf + a++] & 255) << 8, r = e.pending_buf[e.sym_buf + a++], n === 0 ? M(e, r, i) : (s = Te[r], M(e, s + De + 1, i), l = wt[s], l !== 0 && (r -= Nt[s], I(e, r, l)), n--, s = Ni(n), M(e, s, t), l = Ke[s], l !== 0 && (n -= We[s], I(e, n, l)));
    while (a < e.sym_next);
  M(e, Rt, i);
}, bt = (e, i) => {
  const t = i.dyn_tree, n = i.stat_desc.static_tree, r = i.stat_desc.has_stree, a = i.stat_desc.elems;
  let s, l, h = -1, o;
  for (e.heap_len = 0, e.heap_max = vi, s = 0; s < a; s++)
    t[s * 2] !== 0 ? (e.heap[++e.heap_len] = h = s, e.depth[s] = 0) : t[s * 2 + 1] = 0;
  for (; e.heap_len < 2; )
    o = e.heap[++e.heap_len] = h < 2 ? ++h : 0, t[o * 2] = 1, e.depth[o] = 0, e.opt_len--, r && (e.static_len -= n[o * 2 + 1]);
  for (i.max_code = h, s = e.heap_len >> 1; s >= 1; s--)
    nt(e, t, s);
  o = a;
  do
    s = e.heap[
      1
      /*SMALLEST*/
    ], e.heap[
      1
      /*SMALLEST*/
    ] = e.heap[e.heap_len--], nt(
      e,
      t,
      1
      /*SMALLEST*/
    ), l = e.heap[
      1
      /*SMALLEST*/
    ], e.heap[--e.heap_max] = s, e.heap[--e.heap_max] = l, t[o * 2] = t[s * 2] + t[l * 2], e.depth[o] = (e.depth[s] >= e.depth[l] ? e.depth[s] : e.depth[l]) + 1, t[s * 2 + 1] = t[l * 2 + 1] = o, e.heap[
      1
      /*SMALLEST*/
    ] = o++, nt(
      e,
      t,
      1
      /*SMALLEST*/
    );
  while (e.heap_len >= 2);
  e.heap[--e.heap_max] = e.heap[
    1
    /*SMALLEST*/
  ], An(e, i), Ii(t, h, e.bl_count);
}, $t = (e, i, t) => {
  let n, r = -1, a, s = i[0 * 2 + 1], l = 0, h = 7, o = 4;
  for (s === 0 && (h = 138, o = 3), i[(t + 1) * 2 + 1] = 65535, n = 0; n <= t; n++)
    a = s, s = i[(n + 1) * 2 + 1], !(++l < h && a === s) && (l < o ? e.bl_tree[a * 2] += l : a !== 0 ? (a !== r && e.bl_tree[a * 2]++, e.bl_tree[Si * 2]++) : l <= 10 ? e.bl_tree[Ai * 2]++ : e.bl_tree[Ti * 2]++, l = 0, r = a, s === 0 ? (h = 138, o = 3) : a === s ? (h = 6, o = 3) : (h = 7, o = 4));
}, Bt = (e, i, t) => {
  let n, r = -1, a, s = i[0 * 2 + 1], l = 0, h = 7, o = 4;
  for (s === 0 && (h = 138, o = 3), n = 0; n <= t; n++)
    if (a = s, s = i[(n + 1) * 2 + 1], !(++l < h && a === s)) {
      if (l < o)
        do
          M(e, a, e.bl_tree);
        while (--l !== 0);
      else
        a !== 0 ? (a !== r && (M(e, a, e.bl_tree), l--), M(e, Si, e.bl_tree), I(e, l - 3, 2)) : l <= 10 ? (M(e, Ai, e.bl_tree), I(e, l - 3, 3)) : (M(e, Ti, e.bl_tree), I(e, l - 11, 7));
      l = 0, r = a, s === 0 ? (h = 138, o = 3) : a === s ? (h = 6, o = 3) : (h = 7, o = 4);
    }
}, zn = (e) => {
  let i;
  for ($t(e, e.dyn_ltree, e.l_desc.max_code), $t(e, e.dyn_dtree, e.d_desc.max_code), bt(e, e.bl_desc), i = Lt - 1; i >= 3 && e.bl_tree[zi[i] * 2 + 1] === 0; i--)
    ;
  return e.opt_len += 3 * (i + 1) + 5 + 5 + 4, i;
}, On = (e, i, t, n) => {
  let r;
  for (I(e, i - 257, 5), I(e, t - 1, 5), I(e, n - 4, 4), r = 0; r < n; r++)
    I(e, e.bl_tree[zi[r] * 2 + 1], 3);
  Bt(e, e.dyn_ltree, i - 1), Bt(e, e.dyn_dtree, t - 1);
}, Ln = (e) => {
  let i = 4093624447, t;
  for (t = 0; t <= 31; t++, i >>>= 1)
    if (i & 1 && e.dyn_ltree[t * 2] !== 0)
      return 0;
  if (e.dyn_ltree[9 * 2] !== 0 || e.dyn_ltree[10 * 2] !== 0 || e.dyn_ltree[13 * 2] !== 0)
    return 1;
  for (t = 32; t < De; t++)
    if (e.dyn_ltree[t * 2] !== 0)
      return 1;
  return 0;
};
let Mt = !1;
const Rn = (e) => {
  Mt || (Tn(), Mt = !0), e.l_desc = new it(e.dyn_ltree, Oi), e.d_desc = new it(e.dyn_dtree, Li), e.bl_desc = new it(e.bl_tree, Ri), e.bi_buf = 0, e.bi_valid = 0, Ci(e);
}, Ui = (e, i, t, n) => {
  I(e, (bn << 1) + (n ? 1 : 0), 3), Zi(e), ze(e, t), ze(e, ~t), t && e.pending_buf.set(e.window.subarray(i, i + t), e.pending), e.pending += t;
}, Nn = (e) => {
  I(e, Ei << 1, 3), M(e, Rt, W), Sn(e);
}, Dn = (e, i, t, n) => {
  let r, a, s = 0;
  e.level > 0 ? (e.strm.data_type === 2 && (e.strm.data_type = Ln(e)), bt(e, e.l_desc), bt(e, e.d_desc), s = zn(e), r = e.opt_len + 3 + 7 >>> 3, a = e.static_len + 3 + 7 >>> 3, a <= r && (r = a)) : r = a = t + 5, t + 4 <= r && i !== -1 ? Ui(e, i, t, n) : e.strategy === 4 || a === r ? (I(e, (Ei << 1) + (n ? 1 : 0), 3), Ft(e, W, ke)) : (I(e, (mn << 1) + (n ? 1 : 0), 3), On(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, s + 1), Ft(e, e.dyn_ltree, e.dyn_dtree)), Ci(e), n && Zi(e);
}, In = (e, i, t) => (e.pending_buf[e.sym_buf + e.sym_next++] = i, e.pending_buf[e.sym_buf + e.sym_next++] = i >> 8, e.pending_buf[e.sym_buf + e.sym_next++] = t, i === 0 ? e.dyn_ltree[t * 2]++ : (e.matches++, i--, e.dyn_ltree[(Te[t] + De + 1) * 2]++, e.dyn_dtree[Ni(i) * 2]++), e.sym_next === e.sym_end);
var Cn = Rn, Zn = Ui, Un = Dn, Pn = In, Fn = Nn, $n = {
  _tr_init: Cn,
  _tr_stored_block: Zn,
  _tr_flush_block: Un,
  _tr_tally: Pn,
  _tr_align: Fn
};
const Bn = (e, i, t, n) => {
  let r = e & 65535 | 0, a = e >>> 16 & 65535 | 0, s = 0;
  for (; t !== 0; ) {
    s = t > 2e3 ? 2e3 : t, t -= s;
    do
      r = r + i[n++] | 0, a = a + r | 0;
    while (--s);
    r %= 65521, a %= 65521;
  }
  return r | a << 16 | 0;
};
var Oe = Bn;
const Mn = () => {
  let e, i = [];
  for (var t = 0; t < 256; t++) {
    e = t;
    for (var n = 0; n < 8; n++)
      e = e & 1 ? 3988292384 ^ e >>> 1 : e >>> 1;
    i[t] = e;
  }
  return i;
}, Hn = new Uint32Array(Mn()), jn = (e, i, t, n) => {
  const r = Hn, a = n + t;
  e ^= -1;
  for (let s = n; s < a; s++)
    e = e >>> 8 ^ r[(e ^ i[s]) & 255];
  return e ^ -1;
};
var R = jn, ae = {
  2: "need dictionary",
  /* Z_NEED_DICT       2  */
  1: "stream end",
  /* Z_STREAM_END      1  */
  0: "",
  /* Z_OK              0  */
  "-1": "file error",
  /* Z_ERRNO         (-1) */
  "-2": "stream error",
  /* Z_STREAM_ERROR  (-2) */
  "-3": "data error",
  /* Z_DATA_ERROR    (-3) */
  "-4": "insufficient memory",
  /* Z_MEM_ERROR     (-4) */
  "-5": "buffer error",
  /* Z_BUF_ERROR     (-5) */
  "-6": "incompatible version"
  /* Z_VERSION_ERROR (-6) */
}, se = {
  /* Allowed flush values; see deflate() and inflate() below for details */
  Z_NO_FLUSH: 0,
  Z_PARTIAL_FLUSH: 1,
  Z_SYNC_FLUSH: 2,
  Z_FULL_FLUSH: 3,
  Z_FINISH: 4,
  Z_BLOCK: 5,
  Z_TREES: 6,
  /* Return codes for the compression/decompression functions. Negative values
  * are errors, positive values are used for special but normal events.
  */
  Z_OK: 0,
  Z_STREAM_END: 1,
  Z_NEED_DICT: 2,
  Z_ERRNO: -1,
  Z_STREAM_ERROR: -2,
  Z_DATA_ERROR: -3,
  Z_MEM_ERROR: -4,
  Z_BUF_ERROR: -5,
  //Z_VERSION_ERROR: -6,
  /* compression levels */
  Z_NO_COMPRESSION: 0,
  Z_BEST_SPEED: 1,
  Z_BEST_COMPRESSION: 9,
  Z_DEFAULT_COMPRESSION: -1,
  Z_FILTERED: 1,
  Z_HUFFMAN_ONLY: 2,
  Z_RLE: 3,
  Z_FIXED: 4,
  Z_DEFAULT_STRATEGY: 0,
  /* Possible values of the data_type field (though see inflate()) */
  Z_BINARY: 0,
  Z_TEXT: 1,
  //Z_ASCII:                1, // = Z_TEXT (deprecated)
  Z_UNKNOWN: 2,
  /* The deflate compression method */
  Z_DEFLATED: 8
  //Z_NULL:                 null // Use -1 or null inline, depending on var type
};
const { _tr_init: Kn, _tr_stored_block: mt, _tr_flush_block: Wn, _tr_tally: q, _tr_align: Gn } = $n, {
  Z_NO_FLUSH: Q,
  Z_PARTIAL_FLUSH: Yn,
  Z_FULL_FLUSH: Vn,
  Z_FINISH: P,
  Z_BLOCK: Ht,
  Z_OK: N,
  Z_STREAM_END: jt,
  Z_STREAM_ERROR: H,
  Z_DATA_ERROR: Xn,
  Z_BUF_ERROR: rt,
  Z_DEFAULT_COMPRESSION: Jn,
  Z_FILTERED: qn,
  Z_HUFFMAN_ONLY: Fe,
  Z_RLE: Qn,
  Z_FIXED: er,
  Z_DEFAULT_STRATEGY: tr,
  Z_UNKNOWN: ir,
  Z_DEFLATED: Xe
} = se, nr = 9, rr = 15, ar = 8, or = 29, lr = 256, yt = lr + 1 + or, sr = 30, fr = 19, hr = 2 * yt + 1, dr = 15, x = 3, J = 258, j = J + x + 1, cr = 32, ue = 42, Dt = 57, xt = 69, kt = 73, Et = 91, vt = 103, ne = 113, ye = 666, D = 1, we = 2, oe = 3, be = 4, _r = 3, re = (e, i) => (e.msg = ae[i], i), Kt = (e) => e * 2 - (e > 4 ? 9 : 0), X = (e) => {
  let i = e.length;
  for (; --i >= 0; )
    e[i] = 0;
}, ur = (e) => {
  let i, t, n, r = e.w_size;
  i = e.hash_size, n = i;
  do
    t = e.head[--n], e.head[n] = t >= r ? t - r : 0;
  while (--i);
  i = r, n = i;
  do
    t = e.prev[--n], e.prev[n] = t >= r ? t - r : 0;
  while (--i);
};
let gr = (e, i, t) => (i << e.hash_shift ^ t) & e.hash_mask, ee = gr;
const C = (e) => {
  const i = e.state;
  let t = i.pending;
  t > e.avail_out && (t = e.avail_out), t !== 0 && (e.output.set(i.pending_buf.subarray(i.pending_out, i.pending_out + t), e.next_out), e.next_out += t, i.pending_out += t, e.total_out += t, e.avail_out -= t, i.pending -= t, i.pending === 0 && (i.pending_out = 0));
}, Z = (e, i) => {
  Wn(e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, i), e.block_start = e.strstart, C(e.strm);
}, S = (e, i) => {
  e.pending_buf[e.pending++] = i;
}, me = (e, i) => {
  e.pending_buf[e.pending++] = i >>> 8 & 255, e.pending_buf[e.pending++] = i & 255;
}, St = (e, i, t, n) => {
  let r = e.avail_in;
  return r > n && (r = n), r === 0 ? 0 : (e.avail_in -= r, i.set(e.input.subarray(e.next_in, e.next_in + r), t), e.state.wrap === 1 ? e.adler = Oe(e.adler, i, r, t) : e.state.wrap === 2 && (e.adler = R(e.adler, i, r, t)), e.next_in += r, e.total_in += r, r);
}, Pi = (e, i) => {
  let t = e.max_chain_length, n = e.strstart, r, a, s = e.prev_length, l = e.nice_match;
  const h = e.strstart > e.w_size - j ? e.strstart - (e.w_size - j) : 0, o = e.window, f = e.w_mask, u = e.prev, _ = e.strstart + J;
  let d = o[n + s - 1], g = o[n + s];
  e.prev_length >= e.good_match && (t >>= 2), l > e.lookahead && (l = e.lookahead);
  do
    if (r = i, !(o[r + s] !== g || o[r + s - 1] !== d || o[r] !== o[n] || o[++r] !== o[n + 1])) {
      n += 2, r++;
      do
        ;
      while (o[++n] === o[++r] && o[++n] === o[++r] && o[++n] === o[++r] && o[++n] === o[++r] && o[++n] === o[++r] && o[++n] === o[++r] && o[++n] === o[++r] && o[++n] === o[++r] && n < _);
      if (a = J - (_ - n), n = _ - J, a > s) {
        if (e.match_start = i, s = a, a >= l)
          break;
        d = o[n + s - 1], g = o[n + s];
      }
    }
  while ((i = u[i & f]) > h && --t !== 0);
  return s <= e.lookahead ? s : e.lookahead;
}, ge = (e) => {
  const i = e.w_size;
  let t, n, r;
  do {
    if (n = e.window_size - e.lookahead - e.strstart, e.strstart >= i + (i - j) && (e.window.set(e.window.subarray(i, i + i - n), 0), e.match_start -= i, e.strstart -= i, e.block_start -= i, e.insert > e.strstart && (e.insert = e.strstart), ur(e), n += i), e.strm.avail_in === 0)
      break;
    if (t = St(e.strm, e.window, e.strstart + e.lookahead, n), e.lookahead += t, e.lookahead + e.insert >= x)
      for (r = e.strstart - e.insert, e.ins_h = e.window[r], e.ins_h = ee(e, e.ins_h, e.window[r + 1]); e.insert && (e.ins_h = ee(e, e.ins_h, e.window[r + x - 1]), e.prev[r & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = r, r++, e.insert--, !(e.lookahead + e.insert < x)); )
        ;
  } while (e.lookahead < j && e.strm.avail_in !== 0);
}, Fi = (e, i) => {
  let t = e.pending_buf_size - 5 > e.w_size ? e.w_size : e.pending_buf_size - 5, n, r, a, s = 0, l = e.strm.avail_in;
  do {
    if (n = 65535, a = e.bi_valid + 42 >> 3, e.strm.avail_out < a || (a = e.strm.avail_out - a, r = e.strstart - e.block_start, n > r + e.strm.avail_in && (n = r + e.strm.avail_in), n > a && (n = a), n < t && (n === 0 && i !== P || i === Q || n !== r + e.strm.avail_in)))
      break;
    s = i === P && n === r + e.strm.avail_in ? 1 : 0, mt(e, 0, 0, s), e.pending_buf[e.pending - 4] = n, e.pending_buf[e.pending - 3] = n >> 8, e.pending_buf[e.pending - 2] = ~n, e.pending_buf[e.pending - 1] = ~n >> 8, C(e.strm), r && (r > n && (r = n), e.strm.output.set(e.window.subarray(e.block_start, e.block_start + r), e.strm.next_out), e.strm.next_out += r, e.strm.avail_out -= r, e.strm.total_out += r, e.block_start += r, n -= r), n && (St(e.strm, e.strm.output, e.strm.next_out, n), e.strm.next_out += n, e.strm.avail_out -= n, e.strm.total_out += n);
  } while (s === 0);
  return l -= e.strm.avail_in, l && (l >= e.w_size ? (e.matches = 2, e.window.set(e.strm.input.subarray(e.strm.next_in - e.w_size, e.strm.next_in), 0), e.strstart = e.w_size, e.insert = e.strstart) : (e.window_size - e.strstart <= l && (e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, e.insert > e.strstart && (e.insert = e.strstart)), e.window.set(e.strm.input.subarray(e.strm.next_in - l, e.strm.next_in), e.strstart), e.strstart += l, e.insert += l > e.w_size - e.insert ? e.w_size - e.insert : l), e.block_start = e.strstart), e.high_water < e.strstart && (e.high_water = e.strstart), s ? be : i !== Q && i !== P && e.strm.avail_in === 0 && e.strstart === e.block_start ? we : (a = e.window_size - e.strstart, e.strm.avail_in > a && e.block_start >= e.w_size && (e.block_start -= e.w_size, e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, a += e.w_size, e.insert > e.strstart && (e.insert = e.strstart)), a > e.strm.avail_in && (a = e.strm.avail_in), a && (St(e.strm, e.window, e.strstart, a), e.strstart += a, e.insert += a > e.w_size - e.insert ? e.w_size - e.insert : a), e.high_water < e.strstart && (e.high_water = e.strstart), a = e.bi_valid + 42 >> 3, a = e.pending_buf_size - a > 65535 ? 65535 : e.pending_buf_size - a, t = a > e.w_size ? e.w_size : a, r = e.strstart - e.block_start, (r >= t || (r || i === P) && i !== Q && e.strm.avail_in === 0 && r <= a) && (n = r > a ? a : r, s = i === P && e.strm.avail_in === 0 && n === r ? 1 : 0, mt(e, e.block_start, n, s), e.block_start += n, C(e.strm)), s ? oe : D);
}, at = (e, i) => {
  let t, n;
  for (; ; ) {
    if (e.lookahead < j) {
      if (ge(e), e.lookahead < j && i === Q)
        return D;
      if (e.lookahead === 0)
        break;
    }
    if (t = 0, e.lookahead >= x && (e.ins_h = ee(e, e.ins_h, e.window[e.strstart + x - 1]), t = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), t !== 0 && e.strstart - t <= e.w_size - j && (e.match_length = Pi(e, t)), e.match_length >= x)
      if (n = q(e, e.strstart - e.match_start, e.match_length - x), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= x) {
        e.match_length--;
        do
          e.strstart++, e.ins_h = ee(e, e.ins_h, e.window[e.strstart + x - 1]), t = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart;
        while (--e.match_length !== 0);
        e.strstart++;
      } else
        e.strstart += e.match_length, e.match_length = 0, e.ins_h = e.window[e.strstart], e.ins_h = ee(e, e.ins_h, e.window[e.strstart + 1]);
    else
      n = q(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++;
    if (n && (Z(e, !1), e.strm.avail_out === 0))
      return D;
  }
  return e.insert = e.strstart < x - 1 ? e.strstart : x - 1, i === P ? (Z(e, !0), e.strm.avail_out === 0 ? oe : be) : e.sym_next && (Z(e, !1), e.strm.avail_out === 0) ? D : we;
}, he = (e, i) => {
  let t, n, r;
  for (; ; ) {
    if (e.lookahead < j) {
      if (ge(e), e.lookahead < j && i === Q)
        return D;
      if (e.lookahead === 0)
        break;
    }
    if (t = 0, e.lookahead >= x && (e.ins_h = ee(e, e.ins_h, e.window[e.strstart + x - 1]), t = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = x - 1, t !== 0 && e.prev_length < e.max_lazy_match && e.strstart - t <= e.w_size - j && (e.match_length = Pi(e, t), e.match_length <= 5 && (e.strategy === qn || e.match_length === x && e.strstart - e.match_start > 4096) && (e.match_length = x - 1)), e.prev_length >= x && e.match_length <= e.prev_length) {
      r = e.strstart + e.lookahead - x, n = q(e, e.strstart - 1 - e.prev_match, e.prev_length - x), e.lookahead -= e.prev_length - 1, e.prev_length -= 2;
      do
        ++e.strstart <= r && (e.ins_h = ee(e, e.ins_h, e.window[e.strstart + x - 1]), t = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart);
      while (--e.prev_length !== 0);
      if (e.match_available = 0, e.match_length = x - 1, e.strstart++, n && (Z(e, !1), e.strm.avail_out === 0))
        return D;
    } else if (e.match_available) {
      if (n = q(e, 0, e.window[e.strstart - 1]), n && Z(e, !1), e.strstart++, e.lookahead--, e.strm.avail_out === 0)
        return D;
    } else
      e.match_available = 1, e.strstart++, e.lookahead--;
  }
  return e.match_available && (n = q(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < x - 1 ? e.strstart : x - 1, i === P ? (Z(e, !0), e.strm.avail_out === 0 ? oe : be) : e.sym_next && (Z(e, !1), e.strm.avail_out === 0) ? D : we;
}, pr = (e, i) => {
  let t, n, r, a;
  const s = e.window;
  for (; ; ) {
    if (e.lookahead <= J) {
      if (ge(e), e.lookahead <= J && i === Q)
        return D;
      if (e.lookahead === 0)
        break;
    }
    if (e.match_length = 0, e.lookahead >= x && e.strstart > 0 && (r = e.strstart - 1, n = s[r], n === s[++r] && n === s[++r] && n === s[++r])) {
      a = e.strstart + J;
      do
        ;
      while (n === s[++r] && n === s[++r] && n === s[++r] && n === s[++r] && n === s[++r] && n === s[++r] && n === s[++r] && n === s[++r] && r < a);
      e.match_length = J - (a - r), e.match_length > e.lookahead && (e.match_length = e.lookahead);
    }
    if (e.match_length >= x ? (t = q(e, 1, e.match_length - x), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (t = q(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), t && (Z(e, !1), e.strm.avail_out === 0))
      return D;
  }
  return e.insert = 0, i === P ? (Z(e, !0), e.strm.avail_out === 0 ? oe : be) : e.sym_next && (Z(e, !1), e.strm.avail_out === 0) ? D : we;
}, wr = (e, i) => {
  let t;
  for (; ; ) {
    if (e.lookahead === 0 && (ge(e), e.lookahead === 0)) {
      if (i === Q)
        return D;
      break;
    }
    if (e.match_length = 0, t = q(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, t && (Z(e, !1), e.strm.avail_out === 0))
      return D;
  }
  return e.insert = 0, i === P ? (Z(e, !0), e.strm.avail_out === 0 ? oe : be) : e.sym_next && (Z(e, !1), e.strm.avail_out === 0) ? D : we;
};
function B(e, i, t, n, r) {
  this.good_length = e, this.max_lazy = i, this.nice_length = t, this.max_chain = n, this.func = r;
}
const xe = [
  /*      good lazy nice chain */
  new B(0, 0, 0, 0, Fi),
  /* 0 store only */
  new B(4, 4, 8, 4, at),
  /* 1 max speed, no lazy matches */
  new B(4, 5, 16, 8, at),
  /* 2 */
  new B(4, 6, 32, 32, at),
  /* 3 */
  new B(4, 4, 16, 16, he),
  /* 4 lazy matches */
  new B(8, 16, 32, 32, he),
  /* 5 */
  new B(8, 16, 128, 128, he),
  /* 6 */
  new B(8, 32, 128, 256, he),
  /* 7 */
  new B(32, 128, 258, 1024, he),
  /* 8 */
  new B(32, 258, 258, 4096, he)
  /* 9 max compression */
], br = (e) => {
  e.window_size = 2 * e.w_size, X(e.head), e.max_lazy_match = xe[e.level].max_lazy, e.good_match = xe[e.level].good_length, e.nice_match = xe[e.level].nice_length, e.max_chain_length = xe[e.level].max_chain, e.strstart = 0, e.block_start = 0, e.lookahead = 0, e.insert = 0, e.match_length = e.prev_length = x - 1, e.match_available = 0, e.ins_h = 0;
};
function mr() {
  this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = Xe, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new Uint16Array(hr * 2), this.dyn_dtree = new Uint16Array((2 * sr + 1) * 2), this.bl_tree = new Uint16Array((2 * fr + 1) * 2), X(this.dyn_ltree), X(this.dyn_dtree), X(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new Uint16Array(dr + 1), this.heap = new Uint16Array(2 * yt + 1), X(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new Uint16Array(2 * yt + 1), X(this.depth), this.sym_buf = 0, this.lit_bufsize = 0, this.sym_next = 0, this.sym_end = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
}
const Ie = (e) => {
  if (!e)
    return 1;
  const i = e.state;
  return !i || i.strm !== e || i.status !== ue && //#ifdef GZIP
  i.status !== Dt && //#endif
  i.status !== xt && i.status !== kt && i.status !== Et && i.status !== vt && i.status !== ne && i.status !== ye ? 1 : 0;
}, $i = (e) => {
  if (Ie(e))
    return re(e, H);
  e.total_in = e.total_out = 0, e.data_type = ir;
  const i = e.state;
  return i.pending = 0, i.pending_out = 0, i.wrap < 0 && (i.wrap = -i.wrap), i.status = //#ifdef GZIP
  i.wrap === 2 ? Dt : (
    //#endif
    i.wrap ? ue : ne
  ), e.adler = i.wrap === 2 ? 0 : 1, i.last_flush = -2, Kn(i), N;
}, Bi = (e) => {
  const i = $i(e);
  return i === N && br(e.state), i;
}, yr = (e, i) => Ie(e) || e.state.wrap !== 2 ? H : (e.state.gzhead = i, N), Mi = (e, i, t, n, r, a) => {
  if (!e)
    return H;
  let s = 1;
  if (i === Jn && (i = 6), n < 0 ? (s = 0, n = -n) : n > 15 && (s = 2, n -= 16), r < 1 || r > nr || t !== Xe || n < 8 || n > 15 || i < 0 || i > 9 || a < 0 || a > er || n === 8 && s !== 1)
    return re(e, H);
  n === 8 && (n = 9);
  const l = new mr();
  return e.state = l, l.strm = e, l.status = ue, l.wrap = s, l.gzhead = null, l.w_bits = n, l.w_size = 1 << l.w_bits, l.w_mask = l.w_size - 1, l.hash_bits = r + 7, l.hash_size = 1 << l.hash_bits, l.hash_mask = l.hash_size - 1, l.hash_shift = ~~((l.hash_bits + x - 1) / x), l.window = new Uint8Array(l.w_size * 2), l.head = new Uint16Array(l.hash_size), l.prev = new Uint16Array(l.w_size), l.lit_bufsize = 1 << r + 6, l.pending_buf_size = l.lit_bufsize * 4, l.pending_buf = new Uint8Array(l.pending_buf_size), l.sym_buf = l.lit_bufsize, l.sym_end = (l.lit_bufsize - 1) * 3, l.level = i, l.strategy = a, l.method = t, Bi(e);
}, xr = (e, i) => Mi(e, i, Xe, rr, ar, tr), kr = (e, i) => {
  if (Ie(e) || i > Ht || i < 0)
    return e ? re(e, H) : H;
  const t = e.state;
  if (!e.output || e.avail_in !== 0 && !e.input || t.status === ye && i !== P)
    return re(e, e.avail_out === 0 ? rt : H);
  const n = t.last_flush;
  if (t.last_flush = i, t.pending !== 0) {
    if (C(e), e.avail_out === 0)
      return t.last_flush = -1, N;
  } else if (e.avail_in === 0 && Kt(i) <= Kt(n) && i !== P)
    return re(e, rt);
  if (t.status === ye && e.avail_in !== 0)
    return re(e, rt);
  if (t.status === ue && t.wrap === 0 && (t.status = ne), t.status === ue) {
    let r = Xe + (t.w_bits - 8 << 4) << 8, a = -1;
    if (t.strategy >= Fe || t.level < 2 ? a = 0 : t.level < 6 ? a = 1 : t.level === 6 ? a = 2 : a = 3, r |= a << 6, t.strstart !== 0 && (r |= cr), r += 31 - r % 31, me(t, r), t.strstart !== 0 && (me(t, e.adler >>> 16), me(t, e.adler & 65535)), e.adler = 1, t.status = ne, C(e), t.pending !== 0)
      return t.last_flush = -1, N;
  }
  if (t.status === Dt) {
    if (e.adler = 0, S(t, 31), S(t, 139), S(t, 8), t.gzhead)
      S(
        t,
        (t.gzhead.text ? 1 : 0) + (t.gzhead.hcrc ? 2 : 0) + (t.gzhead.extra ? 4 : 0) + (t.gzhead.name ? 8 : 0) + (t.gzhead.comment ? 16 : 0)
      ), S(t, t.gzhead.time & 255), S(t, t.gzhead.time >> 8 & 255), S(t, t.gzhead.time >> 16 & 255), S(t, t.gzhead.time >> 24 & 255), S(t, t.level === 9 ? 2 : t.strategy >= Fe || t.level < 2 ? 4 : 0), S(t, t.gzhead.os & 255), t.gzhead.extra && t.gzhead.extra.length && (S(t, t.gzhead.extra.length & 255), S(t, t.gzhead.extra.length >> 8 & 255)), t.gzhead.hcrc && (e.adler = R(e.adler, t.pending_buf, t.pending, 0)), t.gzindex = 0, t.status = xt;
    else if (S(t, 0), S(t, 0), S(t, 0), S(t, 0), S(t, 0), S(t, t.level === 9 ? 2 : t.strategy >= Fe || t.level < 2 ? 4 : 0), S(t, _r), t.status = ne, C(e), t.pending !== 0)
      return t.last_flush = -1, N;
  }
  if (t.status === xt) {
    if (t.gzhead.extra) {
      let r = t.pending, a = (t.gzhead.extra.length & 65535) - t.gzindex;
      for (; t.pending + a > t.pending_buf_size; ) {
        let l = t.pending_buf_size - t.pending;
        if (t.pending_buf.set(t.gzhead.extra.subarray(t.gzindex, t.gzindex + l), t.pending), t.pending = t.pending_buf_size, t.gzhead.hcrc && t.pending > r && (e.adler = R(e.adler, t.pending_buf, t.pending - r, r)), t.gzindex += l, C(e), t.pending !== 0)
          return t.last_flush = -1, N;
        r = 0, a -= l;
      }
      let s = new Uint8Array(t.gzhead.extra);
      t.pending_buf.set(s.subarray(t.gzindex, t.gzindex + a), t.pending), t.pending += a, t.gzhead.hcrc && t.pending > r && (e.adler = R(e.adler, t.pending_buf, t.pending - r, r)), t.gzindex = 0;
    }
    t.status = kt;
  }
  if (t.status === kt) {
    if (t.gzhead.name) {
      let r = t.pending, a;
      do {
        if (t.pending === t.pending_buf_size) {
          if (t.gzhead.hcrc && t.pending > r && (e.adler = R(e.adler, t.pending_buf, t.pending - r, r)), C(e), t.pending !== 0)
            return t.last_flush = -1, N;
          r = 0;
        }
        t.gzindex < t.gzhead.name.length ? a = t.gzhead.name.charCodeAt(t.gzindex++) & 255 : a = 0, S(t, a);
      } while (a !== 0);
      t.gzhead.hcrc && t.pending > r && (e.adler = R(e.adler, t.pending_buf, t.pending - r, r)), t.gzindex = 0;
    }
    t.status = Et;
  }
  if (t.status === Et) {
    if (t.gzhead.comment) {
      let r = t.pending, a;
      do {
        if (t.pending === t.pending_buf_size) {
          if (t.gzhead.hcrc && t.pending > r && (e.adler = R(e.adler, t.pending_buf, t.pending - r, r)), C(e), t.pending !== 0)
            return t.last_flush = -1, N;
          r = 0;
        }
        t.gzindex < t.gzhead.comment.length ? a = t.gzhead.comment.charCodeAt(t.gzindex++) & 255 : a = 0, S(t, a);
      } while (a !== 0);
      t.gzhead.hcrc && t.pending > r && (e.adler = R(e.adler, t.pending_buf, t.pending - r, r));
    }
    t.status = vt;
  }
  if (t.status === vt) {
    if (t.gzhead.hcrc) {
      if (t.pending + 2 > t.pending_buf_size && (C(e), t.pending !== 0))
        return t.last_flush = -1, N;
      S(t, e.adler & 255), S(t, e.adler >> 8 & 255), e.adler = 0;
    }
    if (t.status = ne, C(e), t.pending !== 0)
      return t.last_flush = -1, N;
  }
  if (e.avail_in !== 0 || t.lookahead !== 0 || i !== Q && t.status !== ye) {
    let r = t.level === 0 ? Fi(t, i) : t.strategy === Fe ? wr(t, i) : t.strategy === Qn ? pr(t, i) : xe[t.level].func(t, i);
    if ((r === oe || r === be) && (t.status = ye), r === D || r === oe)
      return e.avail_out === 0 && (t.last_flush = -1), N;
    if (r === we && (i === Yn ? Gn(t) : i !== Ht && (mt(t, 0, 0, !1), i === Vn && (X(t.head), t.lookahead === 0 && (t.strstart = 0, t.block_start = 0, t.insert = 0))), C(e), e.avail_out === 0))
      return t.last_flush = -1, N;
  }
  return i !== P ? N : t.wrap <= 0 ? jt : (t.wrap === 2 ? (S(t, e.adler & 255), S(t, e.adler >> 8 & 255), S(t, e.adler >> 16 & 255), S(t, e.adler >> 24 & 255), S(t, e.total_in & 255), S(t, e.total_in >> 8 & 255), S(t, e.total_in >> 16 & 255), S(t, e.total_in >> 24 & 255)) : (me(t, e.adler >>> 16), me(t, e.adler & 65535)), C(e), t.wrap > 0 && (t.wrap = -t.wrap), t.pending !== 0 ? N : jt);
}, Er = (e) => {
  if (Ie(e))
    return H;
  const i = e.state.status;
  return e.state = null, i === ne ? re(e, Xn) : N;
}, vr = (e, i) => {
  let t = i.length;
  if (Ie(e))
    return H;
  const n = e.state, r = n.wrap;
  if (r === 2 || r === 1 && n.status !== ue || n.lookahead)
    return H;
  if (r === 1 && (e.adler = Oe(e.adler, i, t, 0)), n.wrap = 0, t >= n.w_size) {
    r === 0 && (X(n.head), n.strstart = 0, n.block_start = 0, n.insert = 0);
    let h = new Uint8Array(n.w_size);
    h.set(i.subarray(t - n.w_size, t), 0), i = h, t = n.w_size;
  }
  const a = e.avail_in, s = e.next_in, l = e.input;
  for (e.avail_in = t, e.next_in = 0, e.input = i, ge(n); n.lookahead >= x; ) {
    let h = n.strstart, o = n.lookahead - (x - 1);
    do
      n.ins_h = ee(n, n.ins_h, n.window[h + x - 1]), n.prev[h & n.w_mask] = n.head[n.ins_h], n.head[n.ins_h] = h, h++;
    while (--o);
    n.strstart = h, n.lookahead = x - 1, ge(n);
  }
  return n.strstart += n.lookahead, n.block_start = n.strstart, n.insert = n.lookahead, n.lookahead = 0, n.match_length = n.prev_length = x - 1, n.match_available = 0, e.next_in = s, e.input = l, e.avail_in = a, n.wrap = r, N;
};
var Sr = xr, Ar = Mi, Tr = Bi, zr = $i, Or = yr, Lr = kr, Rr = Er, Nr = vr, Dr = "pako deflate (from Nodeca project)", Ee = {
  deflateInit: Sr,
  deflateInit2: Ar,
  deflateReset: Tr,
  deflateResetKeep: zr,
  deflateSetHeader: Or,
  deflate: Lr,
  deflateEnd: Rr,
  deflateSetDictionary: Nr,
  deflateInfo: Dr
};
const Ir = (e, i) => Object.prototype.hasOwnProperty.call(e, i);
var Cr = function(e) {
  const i = Array.prototype.slice.call(arguments, 1);
  for (; i.length; ) {
    const t = i.shift();
    if (t) {
      if (typeof t != "object")
        throw new TypeError(t + "must be non-object");
      for (const n in t)
        Ir(t, n) && (e[n] = t[n]);
    }
  }
  return e;
}, Zr = (e) => {
  let i = 0;
  for (let n = 0, r = e.length; n < r; n++)
    i += e[n].length;
  const t = new Uint8Array(i);
  for (let n = 0, r = 0, a = e.length; n < a; n++) {
    let s = e[n];
    t.set(s, r), r += s.length;
  }
  return t;
}, Je = {
  assign: Cr,
  flattenChunks: Zr
};
let Hi = !0;
try {
  String.fromCharCode.apply(null, new Uint8Array(1));
} catch {
  Hi = !1;
}
const Le = new Uint8Array(256);
for (let e = 0; e < 256; e++)
  Le[e] = e >= 252 ? 6 : e >= 248 ? 5 : e >= 240 ? 4 : e >= 224 ? 3 : e >= 192 ? 2 : 1;
Le[254] = Le[254] = 1;
var Ur = (e) => {
  if (typeof TextEncoder == "function" && TextEncoder.prototype.encode)
    return new TextEncoder().encode(e);
  let i, t, n, r, a, s = e.length, l = 0;
  for (r = 0; r < s; r++)
    t = e.charCodeAt(r), (t & 64512) === 55296 && r + 1 < s && (n = e.charCodeAt(r + 1), (n & 64512) === 56320 && (t = 65536 + (t - 55296 << 10) + (n - 56320), r++)), l += t < 128 ? 1 : t < 2048 ? 2 : t < 65536 ? 3 : 4;
  for (i = new Uint8Array(l), a = 0, r = 0; a < l; r++)
    t = e.charCodeAt(r), (t & 64512) === 55296 && r + 1 < s && (n = e.charCodeAt(r + 1), (n & 64512) === 56320 && (t = 65536 + (t - 55296 << 10) + (n - 56320), r++)), t < 128 ? i[a++] = t : t < 2048 ? (i[a++] = 192 | t >>> 6, i[a++] = 128 | t & 63) : t < 65536 ? (i[a++] = 224 | t >>> 12, i[a++] = 128 | t >>> 6 & 63, i[a++] = 128 | t & 63) : (i[a++] = 240 | t >>> 18, i[a++] = 128 | t >>> 12 & 63, i[a++] = 128 | t >>> 6 & 63, i[a++] = 128 | t & 63);
  return i;
};
const Pr = (e, i) => {
  if (i < 65534 && e.subarray && Hi)
    return String.fromCharCode.apply(null, e.length === i ? e : e.subarray(0, i));
  let t = "";
  for (let n = 0; n < i; n++)
    t += String.fromCharCode(e[n]);
  return t;
};
var Fr = (e, i) => {
  const t = i || e.length;
  if (typeof TextDecoder == "function" && TextDecoder.prototype.decode)
    return new TextDecoder().decode(e.subarray(0, i));
  let n, r;
  const a = new Array(t * 2);
  for (r = 0, n = 0; n < t; ) {
    let s = e[n++];
    if (s < 128) {
      a[r++] = s;
      continue;
    }
    let l = Le[s];
    if (l > 4) {
      a[r++] = 65533, n += l - 1;
      continue;
    }
    for (s &= l === 2 ? 31 : l === 3 ? 15 : 7; l > 1 && n < t; )
      s = s << 6 | e[n++] & 63, l--;
    if (l > 1) {
      a[r++] = 65533;
      continue;
    }
    s < 65536 ? a[r++] = s : (s -= 65536, a[r++] = 55296 | s >> 10 & 1023, a[r++] = 56320 | s & 1023);
  }
  return Pr(a, r);
}, $r = (e, i) => {
  i = i || e.length, i > e.length && (i = e.length);
  let t = i - 1;
  for (; t >= 0 && (e[t] & 192) === 128; )
    t--;
  return t < 0 || t === 0 ? i : t + Le[e[t]] > i ? t : i;
}, Re = {
  string2buf: Ur,
  buf2string: Fr,
  utf8border: $r
};
function Br() {
  this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
}
var ji = Br;
const Ki = Object.prototype.toString, {
  Z_NO_FLUSH: Mr,
  Z_SYNC_FLUSH: Hr,
  Z_FULL_FLUSH: jr,
  Z_FINISH: Kr,
  Z_OK: Ge,
  Z_STREAM_END: Wr,
  Z_DEFAULT_COMPRESSION: Gr,
  Z_DEFAULT_STRATEGY: Yr,
  Z_DEFLATED: Vr
} = se;
function Ce(e) {
  this.options = Je.assign({
    level: Gr,
    method: Vr,
    chunkSize: 16384,
    windowBits: 15,
    memLevel: 8,
    strategy: Yr
  }, e || {});
  let i = this.options;
  i.raw && i.windowBits > 0 ? i.windowBits = -i.windowBits : i.gzip && i.windowBits > 0 && i.windowBits < 16 && (i.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new ji(), this.strm.avail_out = 0;
  let t = Ee.deflateInit2(
    this.strm,
    i.level,
    i.method,
    i.windowBits,
    i.memLevel,
    i.strategy
  );
  if (t !== Ge)
    throw new Error(ae[t]);
  if (i.header && Ee.deflateSetHeader(this.strm, i.header), i.dictionary) {
    let n;
    if (typeof i.dictionary == "string" ? n = Re.string2buf(i.dictionary) : Ki.call(i.dictionary) === "[object ArrayBuffer]" ? n = new Uint8Array(i.dictionary) : n = i.dictionary, t = Ee.deflateSetDictionary(this.strm, n), t !== Ge)
      throw new Error(ae[t]);
    this._dict_set = !0;
  }
}
Ce.prototype.push = function(e, i) {
  const t = this.strm, n = this.options.chunkSize;
  let r, a;
  if (this.ended)
    return !1;
  for (i === ~~i ? a = i : a = i === !0 ? Kr : Mr, typeof e == "string" ? t.input = Re.string2buf(e) : Ki.call(e) === "[object ArrayBuffer]" ? t.input = new Uint8Array(e) : t.input = e, t.next_in = 0, t.avail_in = t.input.length; ; ) {
    if (t.avail_out === 0 && (t.output = new Uint8Array(n), t.next_out = 0, t.avail_out = n), (a === Hr || a === jr) && t.avail_out <= 6) {
      this.onData(t.output.subarray(0, t.next_out)), t.avail_out = 0;
      continue;
    }
    if (r = Ee.deflate(t, a), r === Wr)
      return t.next_out > 0 && this.onData(t.output.subarray(0, t.next_out)), r = Ee.deflateEnd(this.strm), this.onEnd(r), this.ended = !0, r === Ge;
    if (t.avail_out === 0) {
      this.onData(t.output);
      continue;
    }
    if (a > 0 && t.next_out > 0) {
      this.onData(t.output.subarray(0, t.next_out)), t.avail_out = 0;
      continue;
    }
    if (t.avail_in === 0)
      break;
  }
  return !0;
};
Ce.prototype.onData = function(e) {
  this.chunks.push(e);
};
Ce.prototype.onEnd = function(e) {
  e === Ge && (this.result = Je.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
};
function It(e, i) {
  const t = new Ce(i);
  if (t.push(e, !0), t.err)
    throw t.msg || ae[t.err];
  return t.result;
}
function Xr(e, i) {
  return i = i || {}, i.raw = !0, It(e, i);
}
function Jr(e, i) {
  return i = i || {}, i.gzip = !0, It(e, i);
}
var qr = Ce, Qr = It, ea = Xr, ta = Jr, ia = se, na = {
  Deflate: qr,
  deflate: Qr,
  deflateRaw: ea,
  gzip: ta,
  constants: ia
};
const $e = 16209, ra = 16191;
var aa = function(i, t) {
  let n, r, a, s, l, h, o, f, u, _, d, g, O, k, b, A, m, c, v, L, p, T, E, w;
  const y = i.state;
  n = i.next_in, E = i.input, r = n + (i.avail_in - 5), a = i.next_out, w = i.output, s = a - (t - i.avail_out), l = a + (i.avail_out - 257), h = y.dmax, o = y.wsize, f = y.whave, u = y.wnext, _ = y.window, d = y.hold, g = y.bits, O = y.lencode, k = y.distcode, b = (1 << y.lenbits) - 1, A = (1 << y.distbits) - 1;
  e:
    do {
      g < 15 && (d += E[n++] << g, g += 8, d += E[n++] << g, g += 8), m = O[d & b];
      t:
        for (; ; ) {
          if (c = m >>> 24, d >>>= c, g -= c, c = m >>> 16 & 255, c === 0)
            w[a++] = m & 65535;
          else if (c & 16) {
            v = m & 65535, c &= 15, c && (g < c && (d += E[n++] << g, g += 8), v += d & (1 << c) - 1, d >>>= c, g -= c), g < 15 && (d += E[n++] << g, g += 8, d += E[n++] << g, g += 8), m = k[d & A];
            i:
              for (; ; ) {
                if (c = m >>> 24, d >>>= c, g -= c, c = m >>> 16 & 255, c & 16) {
                  if (L = m & 65535, c &= 15, g < c && (d += E[n++] << g, g += 8, g < c && (d += E[n++] << g, g += 8)), L += d & (1 << c) - 1, L > h) {
                    i.msg = "invalid distance too far back", y.mode = $e;
                    break e;
                  }
                  if (d >>>= c, g -= c, c = a - s, L > c) {
                    if (c = L - c, c > f && y.sane) {
                      i.msg = "invalid distance too far back", y.mode = $e;
                      break e;
                    }
                    if (p = 0, T = _, u === 0) {
                      if (p += o - c, c < v) {
                        v -= c;
                        do
                          w[a++] = _[p++];
                        while (--c);
                        p = a - L, T = w;
                      }
                    } else if (u < c) {
                      if (p += o + u - c, c -= u, c < v) {
                        v -= c;
                        do
                          w[a++] = _[p++];
                        while (--c);
                        if (p = 0, u < v) {
                          c = u, v -= c;
                          do
                            w[a++] = _[p++];
                          while (--c);
                          p = a - L, T = w;
                        }
                      }
                    } else if (p += u - c, c < v) {
                      v -= c;
                      do
                        w[a++] = _[p++];
                      while (--c);
                      p = a - L, T = w;
                    }
                    for (; v > 2; )
                      w[a++] = T[p++], w[a++] = T[p++], w[a++] = T[p++], v -= 3;
                    v && (w[a++] = T[p++], v > 1 && (w[a++] = T[p++]));
                  } else {
                    p = a - L;
                    do
                      w[a++] = w[p++], w[a++] = w[p++], w[a++] = w[p++], v -= 3;
                    while (v > 2);
                    v && (w[a++] = w[p++], v > 1 && (w[a++] = w[p++]));
                  }
                } else if (c & 64) {
                  i.msg = "invalid distance code", y.mode = $e;
                  break e;
                } else {
                  m = k[(m & 65535) + (d & (1 << c) - 1)];
                  continue i;
                }
                break;
              }
          } else if (c & 64)
            if (c & 32) {
              y.mode = ra;
              break e;
            } else {
              i.msg = "invalid literal/length code", y.mode = $e;
              break e;
            }
          else {
            m = O[(m & 65535) + (d & (1 << c) - 1)];
            continue t;
          }
          break;
        }
    } while (n < r && a < l);
  v = g >> 3, n -= v, g -= v << 3, d &= (1 << g) - 1, i.next_in = n, i.next_out = a, i.avail_in = n < r ? 5 + (r - n) : 5 - (n - r), i.avail_out = a < l ? 257 + (l - a) : 257 - (a - l), y.hold = d, y.bits = g;
};
const de = 15, Wt = 852, Gt = 592, Yt = 0, ot = 1, Vt = 2, oa = new Uint16Array([
  /* Length codes 257..285 base */
  3,
  4,
  5,
  6,
  7,
  8,
  9,
  10,
  11,
  13,
  15,
  17,
  19,
  23,
  27,
  31,
  35,
  43,
  51,
  59,
  67,
  83,
  99,
  115,
  131,
  163,
  195,
  227,
  258,
  0,
  0
]), la = new Uint8Array([
  /* Length codes 257..285 extra */
  16,
  16,
  16,
  16,
  16,
  16,
  16,
  16,
  17,
  17,
  17,
  17,
  18,
  18,
  18,
  18,
  19,
  19,
  19,
  19,
  20,
  20,
  20,
  20,
  21,
  21,
  21,
  21,
  16,
  72,
  78
]), sa = new Uint16Array([
  /* Distance codes 0..29 base */
  1,
  2,
  3,
  4,
  5,
  7,
  9,
  13,
  17,
  25,
  33,
  49,
  65,
  97,
  129,
  193,
  257,
  385,
  513,
  769,
  1025,
  1537,
  2049,
  3073,
  4097,
  6145,
  8193,
  12289,
  16385,
  24577,
  0,
  0
]), fa = new Uint8Array([
  /* Distance codes 0..29 extra */
  16,
  16,
  16,
  16,
  17,
  17,
  18,
  18,
  19,
  19,
  20,
  20,
  21,
  21,
  22,
  22,
  23,
  23,
  24,
  24,
  25,
  25,
  26,
  26,
  27,
  27,
  28,
  28,
  29,
  29,
  64,
  64
]), ha = (e, i, t, n, r, a, s, l) => {
  const h = l.bits;
  let o = 0, f = 0, u = 0, _ = 0, d = 0, g = 0, O = 0, k = 0, b = 0, A = 0, m, c, v, L, p, T = null, E;
  const w = new Uint16Array(de + 1), y = new Uint16Array(de + 1);
  let te = null, Ut, Ue, Pe;
  for (o = 0; o <= de; o++)
    w[o] = 0;
  for (f = 0; f < n; f++)
    w[i[t + f]]++;
  for (d = h, _ = de; _ >= 1 && w[_] === 0; _--)
    ;
  if (d > _ && (d = _), _ === 0)
    return r[a++] = 1 << 24 | 64 << 16 | 0, r[a++] = 1 << 24 | 64 << 16 | 0, l.bits = 1, 0;
  for (u = 1; u < _ && w[u] === 0; u++)
    ;
  for (d < u && (d = u), k = 1, o = 1; o <= de; o++)
    if (k <<= 1, k -= w[o], k < 0)
      return -1;
  if (k > 0 && (e === Yt || _ !== 1))
    return -1;
  for (y[1] = 0, o = 1; o < de; o++)
    y[o + 1] = y[o] + w[o];
  for (f = 0; f < n; f++)
    i[t + f] !== 0 && (s[y[i[t + f]]++] = f);
  if (e === Yt ? (T = te = s, E = 20) : e === ot ? (T = oa, te = la, E = 257) : (T = sa, te = fa, E = 0), A = 0, f = 0, o = u, p = a, g = d, O = 0, v = -1, b = 1 << d, L = b - 1, e === ot && b > Wt || e === Vt && b > Gt)
    return 1;
  for (; ; ) {
    Ut = o - O, s[f] + 1 < E ? (Ue = 0, Pe = s[f]) : s[f] >= E ? (Ue = te[s[f] - E], Pe = T[s[f] - E]) : (Ue = 96, Pe = 0), m = 1 << o - O, c = 1 << g, u = c;
    do
      c -= m, r[p + (A >> O) + c] = Ut << 24 | Ue << 16 | Pe | 0;
    while (c !== 0);
    for (m = 1 << o - 1; A & m; )
      m >>= 1;
    if (m !== 0 ? (A &= m - 1, A += m) : A = 0, f++, --w[o] === 0) {
      if (o === _)
        break;
      o = i[t + s[f]];
    }
    if (o > d && (A & L) !== v) {
      for (O === 0 && (O = d), p += u, g = o - O, k = 1 << g; g + O < _ && (k -= w[g + O], !(k <= 0)); )
        g++, k <<= 1;
      if (b += 1 << g, e === ot && b > Wt || e === Vt && b > Gt)
        return 1;
      v = A & L, r[v] = d << 24 | g << 16 | p - a | 0;
    }
  }
  return A !== 0 && (r[p + A] = o - O << 24 | 64 << 16 | 0), l.bits = d, 0;
};
var ve = ha;
const da = 0, Wi = 1, Gi = 2, {
  Z_FINISH: Xt,
  Z_BLOCK: ca,
  Z_TREES: Be,
  Z_OK: le,
  Z_STREAM_END: _a,
  Z_NEED_DICT: ua,
  Z_STREAM_ERROR: $,
  Z_DATA_ERROR: Yi,
  Z_MEM_ERROR: Vi,
  Z_BUF_ERROR: ga,
  Z_DEFLATED: Jt
} = se, qe = 16180, qt = 16181, Qt = 16182, ei = 16183, ti = 16184, ii = 16185, ni = 16186, ri = 16187, ai = 16188, oi = 16189, Ye = 16190, K = 16191, lt = 16192, li = 16193, st = 16194, si = 16195, fi = 16196, hi = 16197, di = 16198, Me = 16199, He = 16200, ci = 16201, _i = 16202, ui = 16203, gi = 16204, pi = 16205, ft = 16206, wi = 16207, bi = 16208, z = 16209, Xi = 16210, Ji = 16211, pa = 852, wa = 592, ba = 15, ma = ba, mi = (e) => (e >>> 24 & 255) + (e >>> 8 & 65280) + ((e & 65280) << 8) + ((e & 255) << 24);
function ya() {
  this.strm = null, this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new Uint16Array(320), this.work = new Uint16Array(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
}
const fe = (e) => {
  if (!e)
    return 1;
  const i = e.state;
  return !i || i.strm !== e || i.mode < qe || i.mode > Ji ? 1 : 0;
}, qi = (e) => {
  if (fe(e))
    return $;
  const i = e.state;
  return e.total_in = e.total_out = i.total = 0, e.msg = "", i.wrap && (e.adler = i.wrap & 1), i.mode = qe, i.last = 0, i.havedict = 0, i.flags = -1, i.dmax = 32768, i.head = null, i.hold = 0, i.bits = 0, i.lencode = i.lendyn = new Int32Array(pa), i.distcode = i.distdyn = new Int32Array(wa), i.sane = 1, i.back = -1, le;
}, Qi = (e) => {
  if (fe(e))
    return $;
  const i = e.state;
  return i.wsize = 0, i.whave = 0, i.wnext = 0, qi(e);
}, en = (e, i) => {
  let t;
  if (fe(e))
    return $;
  const n = e.state;
  return i < 0 ? (t = 0, i = -i) : (t = (i >> 4) + 5, i < 48 && (i &= 15)), i && (i < 8 || i > 15) ? $ : (n.window !== null && n.wbits !== i && (n.window = null), n.wrap = t, n.wbits = i, Qi(e));
}, tn = (e, i) => {
  if (!e)
    return $;
  const t = new ya();
  e.state = t, t.strm = e, t.window = null, t.mode = qe;
  const n = en(e, i);
  return n !== le && (e.state = null), n;
}, xa = (e) => tn(e, ma);
let yi = !0, ht, dt;
const ka = (e) => {
  if (yi) {
    ht = new Int32Array(512), dt = new Int32Array(32);
    let i = 0;
    for (; i < 144; )
      e.lens[i++] = 8;
    for (; i < 256; )
      e.lens[i++] = 9;
    for (; i < 280; )
      e.lens[i++] = 7;
    for (; i < 288; )
      e.lens[i++] = 8;
    for (ve(Wi, e.lens, 0, 288, ht, 0, e.work, { bits: 9 }), i = 0; i < 32; )
      e.lens[i++] = 5;
    ve(Gi, e.lens, 0, 32, dt, 0, e.work, { bits: 5 }), yi = !1;
  }
  e.lencode = ht, e.lenbits = 9, e.distcode = dt, e.distbits = 5;
}, nn = (e, i, t, n) => {
  let r;
  const a = e.state;
  return a.window === null && (a.wsize = 1 << a.wbits, a.wnext = 0, a.whave = 0, a.window = new Uint8Array(a.wsize)), n >= a.wsize ? (a.window.set(i.subarray(t - a.wsize, t), 0), a.wnext = 0, a.whave = a.wsize) : (r = a.wsize - a.wnext, r > n && (r = n), a.window.set(i.subarray(t - n, t - n + r), a.wnext), n -= r, n ? (a.window.set(i.subarray(t - n, t), 0), a.wnext = n, a.whave = a.wsize) : (a.wnext += r, a.wnext === a.wsize && (a.wnext = 0), a.whave < a.wsize && (a.whave += r))), 0;
}, Ea = (e, i) => {
  let t, n, r, a, s, l, h, o, f, u, _, d, g, O, k = 0, b, A, m, c, v, L, p, T;
  const E = new Uint8Array(4);
  let w, y;
  const te = (
    /* permutation of code lengths */
    new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15])
  );
  if (fe(e) || !e.output || !e.input && e.avail_in !== 0)
    return $;
  t = e.state, t.mode === K && (t.mode = lt), s = e.next_out, r = e.output, h = e.avail_out, a = e.next_in, n = e.input, l = e.avail_in, o = t.hold, f = t.bits, u = l, _ = h, T = le;
  e:
    for (; ; )
      switch (t.mode) {
        case qe:
          if (t.wrap === 0) {
            t.mode = lt;
            break;
          }
          for (; f < 16; ) {
            if (l === 0)
              break e;
            l--, o += n[a++] << f, f += 8;
          }
          if (t.wrap & 2 && o === 35615) {
            t.wbits === 0 && (t.wbits = 15), t.check = 0, E[0] = o & 255, E[1] = o >>> 8 & 255, t.check = R(t.check, E, 2, 0), o = 0, f = 0, t.mode = qt;
            break;
          }
          if (t.head && (t.head.done = !1), !(t.wrap & 1) || /* check if zlib header allowed */
          (((o & 255) << 8) + (o >> 8)) % 31) {
            e.msg = "incorrect header check", t.mode = z;
            break;
          }
          if ((o & 15) !== Jt) {
            e.msg = "unknown compression method", t.mode = z;
            break;
          }
          if (o >>>= 4, f -= 4, p = (o & 15) + 8, t.wbits === 0 && (t.wbits = p), p > 15 || p > t.wbits) {
            e.msg = "invalid window size", t.mode = z;
            break;
          }
          t.dmax = 1 << t.wbits, t.flags = 0, e.adler = t.check = 1, t.mode = o & 512 ? oi : K, o = 0, f = 0;
          break;
        case qt:
          for (; f < 16; ) {
            if (l === 0)
              break e;
            l--, o += n[a++] << f, f += 8;
          }
          if (t.flags = o, (t.flags & 255) !== Jt) {
            e.msg = "unknown compression method", t.mode = z;
            break;
          }
          if (t.flags & 57344) {
            e.msg = "unknown header flags set", t.mode = z;
            break;
          }
          t.head && (t.head.text = o >> 8 & 1), t.flags & 512 && t.wrap & 4 && (E[0] = o & 255, E[1] = o >>> 8 & 255, t.check = R(t.check, E, 2, 0)), o = 0, f = 0, t.mode = Qt;
        case Qt:
          for (; f < 32; ) {
            if (l === 0)
              break e;
            l--, o += n[a++] << f, f += 8;
          }
          t.head && (t.head.time = o), t.flags & 512 && t.wrap & 4 && (E[0] = o & 255, E[1] = o >>> 8 & 255, E[2] = o >>> 16 & 255, E[3] = o >>> 24 & 255, t.check = R(t.check, E, 4, 0)), o = 0, f = 0, t.mode = ei;
        case ei:
          for (; f < 16; ) {
            if (l === 0)
              break e;
            l--, o += n[a++] << f, f += 8;
          }
          t.head && (t.head.xflags = o & 255, t.head.os = o >> 8), t.flags & 512 && t.wrap & 4 && (E[0] = o & 255, E[1] = o >>> 8 & 255, t.check = R(t.check, E, 2, 0)), o = 0, f = 0, t.mode = ti;
        case ti:
          if (t.flags & 1024) {
            for (; f < 16; ) {
              if (l === 0)
                break e;
              l--, o += n[a++] << f, f += 8;
            }
            t.length = o, t.head && (t.head.extra_len = o), t.flags & 512 && t.wrap & 4 && (E[0] = o & 255, E[1] = o >>> 8 & 255, t.check = R(t.check, E, 2, 0)), o = 0, f = 0;
          } else
            t.head && (t.head.extra = null);
          t.mode = ii;
        case ii:
          if (t.flags & 1024 && (d = t.length, d > l && (d = l), d && (t.head && (p = t.head.extra_len - t.length, t.head.extra || (t.head.extra = new Uint8Array(t.head.extra_len)), t.head.extra.set(
            n.subarray(
              a,
              // extra field is limited to 65536 bytes
              // - no need for additional size check
              a + d
            ),
            /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
            p
          )), t.flags & 512 && t.wrap & 4 && (t.check = R(t.check, n, d, a)), l -= d, a += d, t.length -= d), t.length))
            break e;
          t.length = 0, t.mode = ni;
        case ni:
          if (t.flags & 2048) {
            if (l === 0)
              break e;
            d = 0;
            do
              p = n[a + d++], t.head && p && t.length < 65536 && (t.head.name += String.fromCharCode(p));
            while (p && d < l);
            if (t.flags & 512 && t.wrap & 4 && (t.check = R(t.check, n, d, a)), l -= d, a += d, p)
              break e;
          } else
            t.head && (t.head.name = null);
          t.length = 0, t.mode = ri;
        case ri:
          if (t.flags & 4096) {
            if (l === 0)
              break e;
            d = 0;
            do
              p = n[a + d++], t.head && p && t.length < 65536 && (t.head.comment += String.fromCharCode(p));
            while (p && d < l);
            if (t.flags & 512 && t.wrap & 4 && (t.check = R(t.check, n, d, a)), l -= d, a += d, p)
              break e;
          } else
            t.head && (t.head.comment = null);
          t.mode = ai;
        case ai:
          if (t.flags & 512) {
            for (; f < 16; ) {
              if (l === 0)
                break e;
              l--, o += n[a++] << f, f += 8;
            }
            if (t.wrap & 4 && o !== (t.check & 65535)) {
              e.msg = "header crc mismatch", t.mode = z;
              break;
            }
            o = 0, f = 0;
          }
          t.head && (t.head.hcrc = t.flags >> 9 & 1, t.head.done = !0), e.adler = t.check = 0, t.mode = K;
          break;
        case oi:
          for (; f < 32; ) {
            if (l === 0)
              break e;
            l--, o += n[a++] << f, f += 8;
          }
          e.adler = t.check = mi(o), o = 0, f = 0, t.mode = Ye;
        case Ye:
          if (t.havedict === 0)
            return e.next_out = s, e.avail_out = h, e.next_in = a, e.avail_in = l, t.hold = o, t.bits = f, ua;
          e.adler = t.check = 1, t.mode = K;
        case K:
          if (i === ca || i === Be)
            break e;
        case lt:
          if (t.last) {
            o >>>= f & 7, f -= f & 7, t.mode = ft;
            break;
          }
          for (; f < 3; ) {
            if (l === 0)
              break e;
            l--, o += n[a++] << f, f += 8;
          }
          switch (t.last = o & 1, o >>>= 1, f -= 1, o & 3) {
            case 0:
              t.mode = li;
              break;
            case 1:
              if (ka(t), t.mode = Me, i === Be) {
                o >>>= 2, f -= 2;
                break e;
              }
              break;
            case 2:
              t.mode = fi;
              break;
            case 3:
              e.msg = "invalid block type", t.mode = z;
          }
          o >>>= 2, f -= 2;
          break;
        case li:
          for (o >>>= f & 7, f -= f & 7; f < 32; ) {
            if (l === 0)
              break e;
            l--, o += n[a++] << f, f += 8;
          }
          if ((o & 65535) !== (o >>> 16 ^ 65535)) {
            e.msg = "invalid stored block lengths", t.mode = z;
            break;
          }
          if (t.length = o & 65535, o = 0, f = 0, t.mode = st, i === Be)
            break e;
        case st:
          t.mode = si;
        case si:
          if (d = t.length, d) {
            if (d > l && (d = l), d > h && (d = h), d === 0)
              break e;
            r.set(n.subarray(a, a + d), s), l -= d, a += d, h -= d, s += d, t.length -= d;
            break;
          }
          t.mode = K;
          break;
        case fi:
          for (; f < 14; ) {
            if (l === 0)
              break e;
            l--, o += n[a++] << f, f += 8;
          }
          if (t.nlen = (o & 31) + 257, o >>>= 5, f -= 5, t.ndist = (o & 31) + 1, o >>>= 5, f -= 5, t.ncode = (o & 15) + 4, o >>>= 4, f -= 4, t.nlen > 286 || t.ndist > 30) {
            e.msg = "too many length or distance symbols", t.mode = z;
            break;
          }
          t.have = 0, t.mode = hi;
        case hi:
          for (; t.have < t.ncode; ) {
            for (; f < 3; ) {
              if (l === 0)
                break e;
              l--, o += n[a++] << f, f += 8;
            }
            t.lens[te[t.have++]] = o & 7, o >>>= 3, f -= 3;
          }
          for (; t.have < 19; )
            t.lens[te[t.have++]] = 0;
          if (t.lencode = t.lendyn, t.lenbits = 7, w = { bits: t.lenbits }, T = ve(da, t.lens, 0, 19, t.lencode, 0, t.work, w), t.lenbits = w.bits, T) {
            e.msg = "invalid code lengths set", t.mode = z;
            break;
          }
          t.have = 0, t.mode = di;
        case di:
          for (; t.have < t.nlen + t.ndist; ) {
            for (; k = t.lencode[o & (1 << t.lenbits) - 1], b = k >>> 24, A = k >>> 16 & 255, m = k & 65535, !(b <= f); ) {
              if (l === 0)
                break e;
              l--, o += n[a++] << f, f += 8;
            }
            if (m < 16)
              o >>>= b, f -= b, t.lens[t.have++] = m;
            else {
              if (m === 16) {
                for (y = b + 2; f < y; ) {
                  if (l === 0)
                    break e;
                  l--, o += n[a++] << f, f += 8;
                }
                if (o >>>= b, f -= b, t.have === 0) {
                  e.msg = "invalid bit length repeat", t.mode = z;
                  break;
                }
                p = t.lens[t.have - 1], d = 3 + (o & 3), o >>>= 2, f -= 2;
              } else if (m === 17) {
                for (y = b + 3; f < y; ) {
                  if (l === 0)
                    break e;
                  l--, o += n[a++] << f, f += 8;
                }
                o >>>= b, f -= b, p = 0, d = 3 + (o & 7), o >>>= 3, f -= 3;
              } else {
                for (y = b + 7; f < y; ) {
                  if (l === 0)
                    break e;
                  l--, o += n[a++] << f, f += 8;
                }
                o >>>= b, f -= b, p = 0, d = 11 + (o & 127), o >>>= 7, f -= 7;
              }
              if (t.have + d > t.nlen + t.ndist) {
                e.msg = "invalid bit length repeat", t.mode = z;
                break;
              }
              for (; d--; )
                t.lens[t.have++] = p;
            }
          }
          if (t.mode === z)
            break;
          if (t.lens[256] === 0) {
            e.msg = "invalid code -- missing end-of-block", t.mode = z;
            break;
          }
          if (t.lenbits = 9, w = { bits: t.lenbits }, T = ve(Wi, t.lens, 0, t.nlen, t.lencode, 0, t.work, w), t.lenbits = w.bits, T) {
            e.msg = "invalid literal/lengths set", t.mode = z;
            break;
          }
          if (t.distbits = 6, t.distcode = t.distdyn, w = { bits: t.distbits }, T = ve(Gi, t.lens, t.nlen, t.ndist, t.distcode, 0, t.work, w), t.distbits = w.bits, T) {
            e.msg = "invalid distances set", t.mode = z;
            break;
          }
          if (t.mode = Me, i === Be)
            break e;
        case Me:
          t.mode = He;
        case He:
          if (l >= 6 && h >= 258) {
            e.next_out = s, e.avail_out = h, e.next_in = a, e.avail_in = l, t.hold = o, t.bits = f, aa(e, _), s = e.next_out, r = e.output, h = e.avail_out, a = e.next_in, n = e.input, l = e.avail_in, o = t.hold, f = t.bits, t.mode === K && (t.back = -1);
            break;
          }
          for (t.back = 0; k = t.lencode[o & (1 << t.lenbits) - 1], b = k >>> 24, A = k >>> 16 & 255, m = k & 65535, !(b <= f); ) {
            if (l === 0)
              break e;
            l--, o += n[a++] << f, f += 8;
          }
          if (A && !(A & 240)) {
            for (c = b, v = A, L = m; k = t.lencode[L + ((o & (1 << c + v) - 1) >> c)], b = k >>> 24, A = k >>> 16 & 255, m = k & 65535, !(c + b <= f); ) {
              if (l === 0)
                break e;
              l--, o += n[a++] << f, f += 8;
            }
            o >>>= c, f -= c, t.back += c;
          }
          if (o >>>= b, f -= b, t.back += b, t.length = m, A === 0) {
            t.mode = pi;
            break;
          }
          if (A & 32) {
            t.back = -1, t.mode = K;
            break;
          }
          if (A & 64) {
            e.msg = "invalid literal/length code", t.mode = z;
            break;
          }
          t.extra = A & 15, t.mode = ci;
        case ci:
          if (t.extra) {
            for (y = t.extra; f < y; ) {
              if (l === 0)
                break e;
              l--, o += n[a++] << f, f += 8;
            }
            t.length += o & (1 << t.extra) - 1, o >>>= t.extra, f -= t.extra, t.back += t.extra;
          }
          t.was = t.length, t.mode = _i;
        case _i:
          for (; k = t.distcode[o & (1 << t.distbits) - 1], b = k >>> 24, A = k >>> 16 & 255, m = k & 65535, !(b <= f); ) {
            if (l === 0)
              break e;
            l--, o += n[a++] << f, f += 8;
          }
          if (!(A & 240)) {
            for (c = b, v = A, L = m; k = t.distcode[L + ((o & (1 << c + v) - 1) >> c)], b = k >>> 24, A = k >>> 16 & 255, m = k & 65535, !(c + b <= f); ) {
              if (l === 0)
                break e;
              l--, o += n[a++] << f, f += 8;
            }
            o >>>= c, f -= c, t.back += c;
          }
          if (o >>>= b, f -= b, t.back += b, A & 64) {
            e.msg = "invalid distance code", t.mode = z;
            break;
          }
          t.offset = m, t.extra = A & 15, t.mode = ui;
        case ui:
          if (t.extra) {
            for (y = t.extra; f < y; ) {
              if (l === 0)
                break e;
              l--, o += n[a++] << f, f += 8;
            }
            t.offset += o & (1 << t.extra) - 1, o >>>= t.extra, f -= t.extra, t.back += t.extra;
          }
          if (t.offset > t.dmax) {
            e.msg = "invalid distance too far back", t.mode = z;
            break;
          }
          t.mode = gi;
        case gi:
          if (h === 0)
            break e;
          if (d = _ - h, t.offset > d) {
            if (d = t.offset - d, d > t.whave && t.sane) {
              e.msg = "invalid distance too far back", t.mode = z;
              break;
            }
            d > t.wnext ? (d -= t.wnext, g = t.wsize - d) : g = t.wnext - d, d > t.length && (d = t.length), O = t.window;
          } else
            O = r, g = s - t.offset, d = t.length;
          d > h && (d = h), h -= d, t.length -= d;
          do
            r[s++] = O[g++];
          while (--d);
          t.length === 0 && (t.mode = He);
          break;
        case pi:
          if (h === 0)
            break e;
          r[s++] = t.length, h--, t.mode = He;
          break;
        case ft:
          if (t.wrap) {
            for (; f < 32; ) {
              if (l === 0)
                break e;
              l--, o |= n[a++] << f, f += 8;
            }
            if (_ -= h, e.total_out += _, t.total += _, t.wrap & 4 && _ && (e.adler = t.check = /*UPDATE_CHECK(state.check, put - _out, _out);*/
            t.flags ? R(t.check, r, _, s - _) : Oe(t.check, r, _, s - _)), _ = h, t.wrap & 4 && (t.flags ? o : mi(o)) !== t.check) {
              e.msg = "incorrect data check", t.mode = z;
              break;
            }
            o = 0, f = 0;
          }
          t.mode = wi;
        case wi:
          if (t.wrap && t.flags) {
            for (; f < 32; ) {
              if (l === 0)
                break e;
              l--, o += n[a++] << f, f += 8;
            }
            if (t.wrap & 4 && o !== (t.total & 4294967295)) {
              e.msg = "incorrect length check", t.mode = z;
              break;
            }
            o = 0, f = 0;
          }
          t.mode = bi;
        case bi:
          T = _a;
          break e;
        case z:
          T = Yi;
          break e;
        case Xi:
          return Vi;
        case Ji:
        default:
          return $;
      }
  return e.next_out = s, e.avail_out = h, e.next_in = a, e.avail_in = l, t.hold = o, t.bits = f, (t.wsize || _ !== e.avail_out && t.mode < z && (t.mode < ft || i !== Xt)) && nn(e, e.output, e.next_out, _ - e.avail_out), u -= e.avail_in, _ -= e.avail_out, e.total_in += u, e.total_out += _, t.total += _, t.wrap & 4 && _ && (e.adler = t.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/
  t.flags ? R(t.check, r, _, e.next_out - _) : Oe(t.check, r, _, e.next_out - _)), e.data_type = t.bits + (t.last ? 64 : 0) + (t.mode === K ? 128 : 0) + (t.mode === Me || t.mode === st ? 256 : 0), (u === 0 && _ === 0 || i === Xt) && T === le && (T = ga), T;
}, va = (e) => {
  if (fe(e))
    return $;
  let i = e.state;
  return i.window && (i.window = null), e.state = null, le;
}, Sa = (e, i) => {
  if (fe(e))
    return $;
  const t = e.state;
  return t.wrap & 2 ? (t.head = i, i.done = !1, le) : $;
}, Aa = (e, i) => {
  const t = i.length;
  let n, r, a;
  return fe(e) || (n = e.state, n.wrap !== 0 && n.mode !== Ye) ? $ : n.mode === Ye && (r = 1, r = Oe(r, i, t, 0), r !== n.check) ? Yi : (a = nn(e, i, t, t), a ? (n.mode = Xi, Vi) : (n.havedict = 1, le));
};
var Ta = Qi, za = en, Oa = qi, La = xa, Ra = tn, Na = Ea, Da = va, Ia = Sa, Ca = Aa, Za = "pako inflate (from Nodeca project)", G = {
  inflateReset: Ta,
  inflateReset2: za,
  inflateResetKeep: Oa,
  inflateInit: La,
  inflateInit2: Ra,
  inflate: Na,
  inflateEnd: Da,
  inflateGetHeader: Ia,
  inflateSetDictionary: Ca,
  inflateInfo: Za
};
function Ua() {
  this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1;
}
var Pa = Ua;
const rn = Object.prototype.toString, {
  Z_NO_FLUSH: Fa,
  Z_FINISH: $a,
  Z_OK: Ne,
  Z_STREAM_END: ct,
  Z_NEED_DICT: _t,
  Z_STREAM_ERROR: Ba,
  Z_DATA_ERROR: xi,
  Z_MEM_ERROR: Ma
} = se;
function Ze(e) {
  this.options = Je.assign({
    chunkSize: 1024 * 64,
    windowBits: 15,
    to: ""
  }, e || {});
  const i = this.options;
  i.raw && i.windowBits >= 0 && i.windowBits < 16 && (i.windowBits = -i.windowBits, i.windowBits === 0 && (i.windowBits = -15)), i.windowBits >= 0 && i.windowBits < 16 && !(e && e.windowBits) && (i.windowBits += 32), i.windowBits > 15 && i.windowBits < 48 && (i.windowBits & 15 || (i.windowBits |= 15)), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new ji(), this.strm.avail_out = 0;
  let t = G.inflateInit2(
    this.strm,
    i.windowBits
  );
  if (t !== Ne)
    throw new Error(ae[t]);
  if (this.header = new Pa(), G.inflateGetHeader(this.strm, this.header), i.dictionary && (typeof i.dictionary == "string" ? i.dictionary = Re.string2buf(i.dictionary) : rn.call(i.dictionary) === "[object ArrayBuffer]" && (i.dictionary = new Uint8Array(i.dictionary)), i.raw && (t = G.inflateSetDictionary(this.strm, i.dictionary), t !== Ne)))
    throw new Error(ae[t]);
}
Ze.prototype.push = function(e, i) {
  const t = this.strm, n = this.options.chunkSize, r = this.options.dictionary;
  let a, s, l;
  if (this.ended)
    return !1;
  for (i === ~~i ? s = i : s = i === !0 ? $a : Fa, rn.call(e) === "[object ArrayBuffer]" ? t.input = new Uint8Array(e) : t.input = e, t.next_in = 0, t.avail_in = t.input.length; ; ) {
    for (t.avail_out === 0 && (t.output = new Uint8Array(n), t.next_out = 0, t.avail_out = n), a = G.inflate(t, s), a === _t && r && (a = G.inflateSetDictionary(t, r), a === Ne ? a = G.inflate(t, s) : a === xi && (a = _t)); t.avail_in > 0 && a === ct && t.state.wrap > 0 && e[t.next_in] !== 0; )
      G.inflateReset(t), a = G.inflate(t, s);
    switch (a) {
      case Ba:
      case xi:
      case _t:
      case Ma:
        return this.onEnd(a), this.ended = !0, !1;
    }
    if (l = t.avail_out, t.next_out && (t.avail_out === 0 || a === ct))
      if (this.options.to === "string") {
        let h = Re.utf8border(t.output, t.next_out), o = t.next_out - h, f = Re.buf2string(t.output, h);
        t.next_out = o, t.avail_out = n - o, o && t.output.set(t.output.subarray(h, h + o), 0), this.onData(f);
      } else
        this.onData(t.output.length === t.next_out ? t.output : t.output.subarray(0, t.next_out));
    if (!(a === Ne && l === 0)) {
      if (a === ct)
        return a = G.inflateEnd(this.strm), this.onEnd(a), this.ended = !0, !0;
      if (t.avail_in === 0)
        break;
    }
  }
  return !0;
};
Ze.prototype.onData = function(e) {
  this.chunks.push(e);
};
Ze.prototype.onEnd = function(e) {
  e === Ne && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = Je.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
};
function Ct(e, i) {
  const t = new Ze(i);
  if (t.push(e), t.err)
    throw t.msg || ae[t.err];
  return t.result;
}
function Ha(e, i) {
  return i = i || {}, i.raw = !0, Ct(e, i);
}
var ja = Ze, Ka = Ct, Wa = Ha, Ga = Ct, Ya = se, Va = {
  Inflate: ja,
  inflate: Ka,
  inflateRaw: Wa,
  ungzip: Ga,
  constants: Ya
};
const { Deflate: Xa, deflate: Ja, deflateRaw: qa, gzip: Qa } = na, { Inflate: eo, inflate: to, inflateRaw: io, ungzip: no } = Va;
var ro = Xa, ao = Ja, oo = qa, lo = Qa, so = eo, fo = to, ho = io, co = no, _o = se, uo = {
  Deflate: ro,
  deflate: ao,
  deflateRaw: oo,
  gzip: lo,
  Inflate: so,
  inflate: fo,
  inflateRaw: ho,
  ungzip: co,
  constants: _o
};
const At = {
  reset: [0, 0],
  bold: [1, 22],
  dim: [2, 22],
  italic: [3, 23],
  underline: [4, 24],
  overline: [53, 55],
  inverse: [7, 27],
  hidden: [8, 28],
  strikethrough: [9, 29],
  black: [30, 39],
  red: [31, 39],
  green: [32, 39],
  yellow: [33, 39],
  blue: [34, 39],
  magenta: [35, 39],
  cyan: [36, 39],
  white: [37, 39],
  blackBright: [90, 39],
  redBright: [91, 39],
  greenBright: [92, 39],
  yellowBright: [93, 39],
  blueBright: [94, 39],
  magentaBright: [95, 39],
  cyanBright: [96, 39],
  whiteBright: [97, 39],
  bgBlack: [40, 49],
  bgRed: [41, 49],
  bgGreen: [42, 49],
  bgYellow: [43, 49],
  bgBlue: [44, 49],
  bgMagenta: [45, 49],
  bgCyan: [46, 49],
  bgWhite: [47, 49],
  bgBlackBright: [100, 49],
  bgRedBright: [101, 49],
  bgGreenBright: [102, 49],
  bgYellowBright: [103, 49],
  bgBlueBright: [104, 49],
  bgMagentaBright: [105, 49],
  bgCyanBright: [106, 49],
  bgWhiteBright: [107, 49]
};
function Tt(e, i, t, n = !1) {
  const r = String(i), a = (h, o) => `\x1B[${o[0]}m${h}\x1B[${o[1]}m`, s = (h, o) => o != null && typeof o == "string" ? a(h, At[o]) : o != null && Array.isArray(o) ? o.reduce((f, u) => s(f, u), h) : o != null && o[h.trim()] != null ? s(h, o[h.trim()]) : o != null && o["*"] != null ? s(h, o["*"]) : h, l = null;
  return r.replace(/{{(.+?)}}/g, (h, o) => {
    const f = t[o] != null ? String(t[o]) : n ? "" : h;
    return e.stylePrettyLogs ? s(f, e?.prettyLogStyles?.[o] ?? l) + a("", At.reset) : f;
  });
}
function U(e, i = 2, t = 0) {
  return e != null && isNaN(e) ? "" : (e = e != null ? e + t : e, i === 2 ? e == null ? "--" : e < 10 ? "0" + e : e.toString() : e == null ? "---" : e < 10 ? "00" + e : e < 100 ? "0" + e : e.toString());
}
function go(e) {
  return {
    href: e.href,
    protocol: e.protocol,
    username: e.username,
    password: e.password,
    host: e.host,
    hostname: e.hostname,
    port: e.port,
    pathname: e.pathname,
    search: e.search,
    searchParams: [...e.searchParams].map(([i, t]) => ({ key: i, value: t })),
    hash: e.hash,
    origin: e.origin
  };
}
function an(e) {
  const i = /* @__PURE__ */ new Set();
  return JSON.stringify(e, (t, n) => {
    if (typeof n == "object" && n !== null) {
      if (i.has(n))
        return "[Circular]";
      i.add(n);
    }
    return n;
  });
}
function F(e, i) {
  const t = {
    seen: [],
    stylize: on
  };
  return i != null && hn(t, i), ce(t.showHidden) && (t.showHidden = !1), ce(t.depth) && (t.depth = 2), ce(t.colors) && (t.colors = !0), ce(t.customInspect) && (t.customInspect = !0), t.colors && (t.stylize = wo), Ve(t, e, t.depth);
}
F.colors = At;
F.styles = {
  special: "cyan",
  number: "yellow",
  boolean: "yellow",
  undefined: "grey",
  null: "bold",
  string: "green",
  date: "magenta",
  regexp: "red"
};
function po(e) {
  return typeof e == "boolean";
}
function ce(e) {
  return e === void 0;
}
function on(e) {
  return e;
}
function wo(e, i) {
  const t = F.styles[i];
  return t != null && F?.colors?.[t]?.[0] != null && F?.colors?.[t]?.[1] != null ? "\x1B[" + F.colors[t][0] + "m" + e + "\x1B[" + F.colors[t][1] + "m" : e;
}
function je(e) {
  return typeof e == "function";
}
function ln(e) {
  return typeof e == "string";
}
function bo(e) {
  return typeof e == "number";
}
function sn(e) {
  return e === null;
}
function fn(e, i) {
  return Object.prototype.hasOwnProperty.call(e, i);
}
function ut(e) {
  return Qe(e) && Zt(e) === "[object RegExp]";
}
function Qe(e) {
  return typeof e == "object" && e !== null;
}
function gt(e) {
  return Qe(e) && (Zt(e) === "[object Error]" || e instanceof Error);
}
function ki(e) {
  return Qe(e) && Zt(e) === "[object Date]";
}
function Zt(e) {
  return Object.prototype.toString.call(e);
}
function mo(e) {
  const i = {};
  return e.forEach((t) => {
    i[t] = !0;
  }), i;
}
function yo(e, i, t, n, r) {
  const a = [];
  for (let s = 0, l = i.length; s < l; ++s)
    fn(i, String(s)) ? a.push(zt(e, i, t, n, String(s), !0)) : a.push("");
  return r.forEach((s) => {
    s.match(/^\d+$/) || a.push(zt(e, i, t, n, s, !0));
  }), a;
}
function pt(e) {
  return "[" + Error.prototype.toString.call(e) + "]";
}
function Ve(e, i, t = 0) {
  if (e.customInspect && i != null && je(i) && i?.inspect !== F && !(i?.constructor && i?.constructor.prototype === i)) {
    if (typeof i.inspect != "function" && i.toString != null)
      return i.toString();
    let f = i?.inspect(t, e);
    return ln(f) || (f = Ve(e, f, t)), f;
  }
  const n = V(e, i);
  if (n)
    return n;
  let r = Object.keys(i);
  const a = mo(r);
  try {
    e.showHidden && Object.getOwnPropertyNames && (r = Object.getOwnPropertyNames(i));
  } catch {
  }
  if (gt(i) && (r.indexOf("message") >= 0 || r.indexOf("description") >= 0))
    return pt(i);
  if (r.length === 0)
    if (je(e.stylize)) {
      if (je(i)) {
        const f = i.name ? ": " + i.name : "";
        return e.stylize("[Function" + f + "]", "special");
      }
      if (ut(i))
        return e.stylize(RegExp.prototype.toString.call(i), "regexp");
      if (ki(i))
        return e.stylize(Date.prototype.toISOString.call(i), "date");
      if (gt(i))
        return pt(i);
    } else
      return i;
  let s = "", l = !1, h = [`{
`, `
}`];
  if (Array.isArray(i) && (l = !0, h = [`[
`, `
]`]), je(i) && (s = " [Function" + (i.name ? ": " + i.name : "") + "]"), ut(i) && (s = " " + RegExp.prototype.toString.call(i)), ki(i) && (s = " " + Date.prototype.toUTCString.call(i)), gt(i) && (s = " " + pt(i)), r.length === 0 && (!l || i.length == 0))
    return h[0] + s + h[1];
  if (t < 0)
    return ut(i) ? e.stylize(RegExp.prototype.toString.call(i), "regexp") : e.stylize("[Object]", "special");
  e.seen.push(i);
  let o;
  return l ? o = yo(e, i, t, a, r) : o = r.map((f) => zt(e, i, t, a, f, l)), e.seen.pop(), xo(o, s, h);
}
function zt(e, i, t, n, r, a) {
  let s, l, h = { value: void 0 };
  try {
    h.value = i[r];
  } catch {
  }
  try {
    Object.getOwnPropertyDescriptor && (h = Object.getOwnPropertyDescriptor(i, r) || h);
  } catch {
  }
  if (h.get ? h.set ? l = e.stylize("[Getter/Setter]", "special") : l = e.stylize("[Getter]", "special") : h.set && (l = e.stylize("[Setter]", "special")), fn(n, r) || (s = "[" + r + "]"), l || (e.seen.indexOf(h.value) < 0 ? (sn(t) ? l = Ve(e, h.value, void 0) : l = Ve(e, h.value, t - 1), l.indexOf(`
`) > -1 && (a ? l = l.split(`
`).map((o) => "  " + o).join(`
`).substr(2) : l = `
` + l.split(`
`).map((o) => "   " + o).join(`
`))) : l = e.stylize("[Circular]", "special")), ce(s)) {
    if (a && r.match(/^\d+$/))
      return l;
    s = JSON.stringify("" + r), s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (s = s.substr(1, s.length - 2), s = e.stylize(s, "name")) : (s = s.replace(/'/g, "\\'").replace(/\\"/g, "\\'").replace(/(^"|"$)/g, "'"), s = e.stylize(s, "string"));
  }
  return s + ": " + l;
}
function V(e, i) {
  if (ce(i))
    return e.stylize("undefined", "undefined");
  if (ln(i)) {
    const t = "'" + JSON.stringify(i).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, "\\'") + "'";
    return e.stylize(t, "string");
  }
  if (bo(i))
    return e.stylize("" + i, "number");
  if (po(i))
    return e.stylize("" + i, "boolean");
  if (sn(i))
    return e.stylize("null", "null");
}
function xo(e, i, t) {
  return t[0] + (i === "" ? "" : i + `
`) + "  " + e.join(`,
  `) + " " + t[1];
}
function hn(e, i) {
  if (!i || !Qe(i))
    return e;
  const t = { ...e }, n = { ...i }, r = Object.keys(i);
  let a = r.length;
  for (; a--; )
    t[r[a]] = n[r[a]];
  return e;
}
function ko(e, ...i) {
  const t = {
    seen: [],
    stylize: on
  };
  e != null && hn(t, e);
  const n = i[0];
  let r = 0, a = "", s = "";
  if (typeof n == "string") {
    if (i.length === 1)
      return n;
    let l, h = 0;
    for (let o = 0; o < n.length - 1; o++)
      if (n.charCodeAt(o) === 37) {
        const f = n.charCodeAt(++o);
        if (r + 1 !== i.length) {
          switch (f) {
            case 115: {
              const u = i[++r];
              typeof u == "number" || typeof u == "bigint" ? l = V(t, u) : typeof u != "object" || u === null ? l = String(u) : l = F(u, {
                ...e,
                compact: 3,
                colors: !1,
                depth: 0
              });
              break;
            }
            case 106:
              l = an(i[++r]);
              break;
            case 100: {
              const u = i[++r];
              typeof u == "bigint" ? l = V(t, u) : typeof u == "symbol" ? l = "NaN" : l = V(t, u);
              break;
            }
            case 79:
              l = F(i[++r], e);
              break;
            case 111:
              l = F(i[++r], {
                ...e,
                showHidden: !0,
                showProxy: !0,
                depth: 4
              });
              break;
            case 105: {
              const u = i[++r];
              typeof u == "bigint" ? l = V(t, u) : typeof u == "symbol" ? l = "NaN" : l = V(t, parseInt(l));
              break;
            }
            case 102: {
              const u = i[++r];
              typeof u == "symbol" ? l = "NaN" : l = V(t, parseInt(u));
              break;
            }
            case 99:
              r += 1, l = "";
              break;
            case 37:
              a += n.slice(h, o), h = o + 1;
              continue;
            default:
              continue;
          }
          h !== o - 1 && (a += n.slice(h, o - 1)), a += l, h = o + 1;
        } else
          f === 37 && (a += n.slice(h, o), h = o + 1);
      }
    h !== 0 && (r++, s = " ", h < n.length && (a += n.slice(h)));
  }
  for (; r < i.length; ) {
    const l = i[r];
    a += s, a += typeof l != "string" ? F(l, e) : l, s = " ", r++;
  }
  return a;
}
const Eo = {
  getCallerStackFrame: dn,
  getErrorTrace: cn,
  getMeta: Ao,
  transportJSON: Oo,
  transportFormatted: zo,
  isBuffer: Lo,
  isError: un,
  prettyFormatLogObj: To,
  prettyFormatErrorObj: gn
}, vo = {
  runtime: [typeof window, typeof document].includes("undefined") ? "Generic" : "Browser",
  browser: globalThis?.navigator?.userAgent
}, So = /(?:(?:file|https?|global code|[^@]+)@)?(?:file:)?((?:\/[^:/]+){2,})(?::(\d+))?(?::(\d+))?/;
function Ao(e, i, t, n, r, a) {
  return Object.assign({}, vo, {
    name: r,
    parentNames: a,
    date: /* @__PURE__ */ new Date(),
    logLevelId: e,
    logLevelName: i,
    path: n ? void 0 : dn(t)
  });
}
function dn(e, i = Error()) {
  return _n(i?.stack?.split(`
`)?.filter((t) => !t.includes("Error: "))?.[e]);
}
function cn(e) {
  return e?.stack?.split(`
`)?.filter((i) => !i.includes("Error: "))?.reduce((i, t) => (i.push(_n(t)), i), []);
}
function _n(e) {
  const i = globalThis?.location?.origin, t = {
    fullFilePath: void 0,
    fileName: void 0,
    fileNameWithLine: void 0,
    fileColumn: void 0,
    fileLine: void 0,
    filePath: void 0,
    filePathWithLine: void 0,
    method: void 0
  };
  if (e != null) {
    const n = e.match(So);
    if (n) {
      t.filePath = n[1].replace(/\?.*$/, ""), t.fullFilePath = `${i}${t.filePath}`;
      const r = t.filePath.split("/");
      t.fileName = r[r.length - 1], t.fileLine = n[2], t.fileColumn = n[3], t.filePathWithLine = `${t.filePath}:${t.fileLine}`, t.fileNameWithLine = `${t.fileName}:${t.fileLine}`;
    }
  }
  return t;
}
function un(e) {
  return e instanceof Error;
}
function To(e, i) {
  return e.reduce((t, n) => (un(n) ? t.errors.push(gn(n, i)) : t.args.push(n), t), { args: [], errors: [] });
}
function gn(e, i) {
  const t = cn(e).map((r) => Tt(i, i.prettyErrorStackTemplate, { ...r }, !0)), n = {
    errorName: ` ${e.name} `,
    errorMessage: Object.getOwnPropertyNames(e).reduce((r, a) => (a !== "stack" && r.push(e[a]), r), []).join(", "),
    errorStack: t.join(`
`)
  };
  return Tt(i, i.prettyErrorTemplate, n);
}
function zo(e, i, t, n) {
  const r = (t.length > 0 && i.length > 0 ? `
` : "") + t.join(`
`);
  n.prettyInspectOptions.colors = n.stylePrettyLogs, console.log(e + ko(n.prettyInspectOptions, ...i) + r);
}
function Oo(e) {
  console.log(an(e));
}
function Lo(e) {
  return !1;
}
class Ro {
  constructor(i, t, n = 4) {
    this.logObj = t, this.stackDepthLevel = n, this.runtime = Eo, this.settings = {
      type: i?.type ?? "pretty",
      name: i?.name,
      parentNames: i?.parentNames,
      minLevel: i?.minLevel ?? 0,
      argumentsArrayName: i?.argumentsArrayName,
      hideLogPositionForProduction: i?.hideLogPositionForProduction ?? !1,
      prettyLogTemplate: i?.prettyLogTemplate ?? "{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}	{{logLevelName}}	{{filePathWithLine}}{{nameWithDelimiterPrefix}}	",
      prettyErrorTemplate: i?.prettyErrorTemplate ?? `
{{errorName}} {{errorMessage}}
error stack:
{{errorStack}}`,
      prettyErrorStackTemplate: i?.prettyErrorStackTemplate ?? `  • {{fileName}}	{{method}}
	{{filePathWithLine}}`,
      prettyErrorParentNamesSeparator: i?.prettyErrorParentNamesSeparator ?? ":",
      prettyErrorLoggerNameDelimiter: i?.prettyErrorLoggerNameDelimiter ?? "	",
      stylePrettyLogs: i?.stylePrettyLogs ?? !0,
      prettyLogTimeZone: i?.prettyLogTimeZone ?? "UTC",
      prettyLogStyles: i?.prettyLogStyles ?? {
        logLevelName: {
          "*": ["bold", "black", "bgWhiteBright", "dim"],
          SILLY: ["bold", "white"],
          TRACE: ["bold", "whiteBright"],
          DEBUG: ["bold", "green"],
          INFO: ["bold", "blue"],
          WARN: ["bold", "yellow"],
          ERROR: ["bold", "red"],
          FATAL: ["bold", "redBright"]
        },
        dateIsoStr: "white",
        filePathWithLine: "white",
        name: ["white", "bold"],
        nameWithDelimiterPrefix: ["white", "bold"],
        nameWithDelimiterSuffix: ["white", "bold"],
        errorName: ["bold", "bgRedBright", "whiteBright"],
        fileName: ["yellow"],
        fileNameWithLine: "white"
      },
      prettyInspectOptions: i?.prettyInspectOptions ?? {
        colors: !0,
        compact: !1,
        depth: 1 / 0
      },
      metaProperty: i?.metaProperty ?? "_meta",
      maskPlaceholder: i?.maskPlaceholder ?? "[***]",
      maskValuesOfKeys: i?.maskValuesOfKeys ?? ["password"],
      maskValuesOfKeysCaseInsensitive: i?.maskValuesOfKeysCaseInsensitive ?? !1,
      maskValuesRegEx: i?.maskValuesRegEx,
      prefix: [...i?.prefix ?? []],
      attachedTransports: [...i?.attachedTransports ?? []],
      overwrite: {
        mask: i?.overwrite?.mask,
        toLogObj: i?.overwrite?.toLogObj,
        addMeta: i?.overwrite?.addMeta,
        addPlaceholders: i?.overwrite?.addPlaceholders,
        formatMeta: i?.overwrite?.formatMeta,
        formatLogObj: i?.overwrite?.formatLogObj,
        transportFormatted: i?.overwrite?.transportFormatted,
        transportJSON: i?.overwrite?.transportJSON
      }
    };
  }
  log(i, t, ...n) {
    if (i < this.settings.minLevel)
      return;
    const r = [...this.settings.prefix, ...n], a = this.settings.overwrite?.mask != null ? this.settings.overwrite?.mask(r) : this.settings.maskValuesOfKeys != null && this.settings.maskValuesOfKeys.length > 0 ? this._mask(r) : r, s = this.logObj != null ? this._recursiveCloneAndExecuteFunctions(this.logObj) : void 0, l = this.settings.overwrite?.toLogObj != null ? this.settings.overwrite?.toLogObj(a, s) : this._toLogObj(a, s), h = this.settings.overwrite?.addMeta != null ? this.settings.overwrite?.addMeta(l, i, t) : this._addMetaToLogObj(l, i, t);
    let o, f;
    return this.settings.overwrite?.formatMeta != null && (o = this.settings.overwrite?.formatMeta(h?.[this.settings.metaProperty])), this.settings.overwrite?.formatLogObj != null && (f = this.settings.overwrite?.formatLogObj(a, this.settings)), this.settings.type === "pretty" && (o = o ?? this._prettyFormatLogObjMeta(h?.[this.settings.metaProperty]), f = f ?? this.runtime.prettyFormatLogObj(a, this.settings)), o != null && f != null ? this.settings.overwrite?.transportFormatted != null ? this.settings.overwrite?.transportFormatted(o, f.args, f.errors, this.settings) : this.runtime.transportFormatted(o, f.args, f.errors, this.settings) : this.settings.overwrite?.transportJSON != null ? this.settings.overwrite?.transportJSON(h) : this.settings.type !== "hidden" && this.runtime.transportJSON(h), this.settings.attachedTransports != null && this.settings.attachedTransports.length > 0 && this.settings.attachedTransports.forEach((u) => {
      u(h);
    }), h;
  }
  attachTransport(i) {
    this.settings.attachedTransports.push(i);
  }
  getSubLogger(i, t) {
    const n = {
      ...this.settings,
      ...i,
      parentNames: this.settings?.parentNames != null && this.settings?.name != null ? [...this.settings.parentNames, this.settings.name] : this.settings?.name != null ? [this.settings.name] : void 0,
      prefix: [...this.settings.prefix, ...i?.prefix ?? []]
    };
    return new this.constructor(n, t ?? this.logObj, this.stackDepthLevel);
  }
  _mask(i) {
    const t = this.settings.maskValuesOfKeysCaseInsensitive !== !0 ? this.settings.maskValuesOfKeys : this.settings.maskValuesOfKeys.map((n) => n.toLowerCase());
    return i?.map((n) => this._recursiveCloneAndMaskValuesOfKeys(n, t));
  }
  _recursiveCloneAndMaskValuesOfKeys(i, t, n = []) {
    if (n.includes(i))
      return { ...i };
    if (typeof i == "object" && i !== null && n.push(i), this.runtime.isError(i) || this.runtime.isBuffer(i))
      return i;
    if (i instanceof Map)
      return new Map(i);
    if (i instanceof Set)
      return new Set(i);
    if (Array.isArray(i))
      return i.map((r) => this._recursiveCloneAndMaskValuesOfKeys(r, t, n));
    if (i instanceof Date)
      return new Date(i.getTime());
    if (i instanceof URL)
      return go(i);
    if (i !== null && typeof i == "object") {
      const r = this.runtime.isError(i) ? this._cloneError(i) : Object.create(Object.getPrototypeOf(i));
      return Object.getOwnPropertyNames(i).reduce((a, s) => (a[s] = t.includes(this.settings?.maskValuesOfKeysCaseInsensitive !== !0 ? s : s.toLowerCase()) ? this.settings.maskPlaceholder : this._recursiveCloneAndMaskValuesOfKeys(i[s], t, n), a), r);
    } else {
      if (typeof i == "string") {
        let r = i;
        for (const a of this.settings?.maskValuesRegEx || [])
          r = r.replace(a, this.settings?.maskPlaceholder || "");
        return r;
      }
      return i;
    }
  }
  _recursiveCloneAndExecuteFunctions(i, t = []) {
    return this.isObjectOrArray(i) && t.includes(i) ? this.shallowCopy(i) : (this.isObjectOrArray(i) && t.push(i), Array.isArray(i) ? i.map((n) => this._recursiveCloneAndExecuteFunctions(n, t)) : i instanceof Date ? new Date(i.getTime()) : this.isObject(i) ? Object.getOwnPropertyNames(i).reduce((n, r) => {
      const a = Object.getOwnPropertyDescriptor(i, r);
      if (a) {
        Object.defineProperty(n, r, a);
        const s = i[r];
        n[r] = typeof s == "function" ? s() : this._recursiveCloneAndExecuteFunctions(s, t);
      }
      return n;
    }, Object.create(Object.getPrototypeOf(i))) : i);
  }
  isObjectOrArray(i) {
    return typeof i == "object" && i !== null;
  }
  isObject(i) {
    return typeof i == "object" && !Array.isArray(i) && i !== null;
  }
  shallowCopy(i) {
    return Array.isArray(i) ? [...i] : { ...i };
  }
  _toLogObj(i, t = {}) {
    return i = i?.map((n) => this.runtime.isError(n) ? this._toErrorObject(n) : n), this.settings.argumentsArrayName == null ? i.length === 1 && !Array.isArray(i[0]) && this.runtime.isBuffer(i[0]) !== !0 && !(i[0] instanceof Date) ? t = typeof i[0] == "object" && i[0] != null ? { ...i[0], ...t } : { 0: i[0], ...t } : t = { ...t, ...i } : t = {
      ...t,
      [this.settings.argumentsArrayName]: i
    }, t;
  }
  _cloneError(i) {
    const t = new i.constructor();
    return Object.getOwnPropertyNames(i).forEach((n) => {
      t[n] = i[n];
    }), t;
  }
  _toErrorObject(i) {
    return {
      nativeError: i,
      name: i.name ?? "Error",
      message: i.message,
      stack: this.runtime.getErrorTrace(i)
    };
  }
  _addMetaToLogObj(i, t, n) {
    return {
      ...i,
      [this.settings.metaProperty]: this.runtime.getMeta(t, n, this.stackDepthLevel, this.settings.hideLogPositionForProduction, this.settings.name, this.settings.parentNames)
    };
  }
  _prettyFormatLogObjMeta(i) {
    if (i == null)
      return "";
    let t = this.settings.prettyLogTemplate;
    const n = {};
    t.includes("{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}") ? t = t.replace("{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}", "{{dateIsoStr}}") : this.settings.prettyLogTimeZone === "UTC" ? (n.yyyy = i?.date?.getUTCFullYear() ?? "----", n.mm = U(i?.date?.getUTCMonth(), 2, 1), n.dd = U(i?.date?.getUTCDate(), 2), n.hh = U(i?.date?.getUTCHours(), 2), n.MM = U(i?.date?.getUTCMinutes(), 2), n.ss = U(i?.date?.getUTCSeconds(), 2), n.ms = U(i?.date?.getUTCMilliseconds(), 3)) : (n.yyyy = i?.date?.getFullYear() ?? "----", n.mm = U(i?.date?.getMonth(), 2, 1), n.dd = U(i?.date?.getDate(), 2), n.hh = U(i?.date?.getHours(), 2), n.MM = U(i?.date?.getMinutes(), 2), n.ss = U(i?.date?.getSeconds(), 2), n.ms = U(i?.date?.getMilliseconds(), 3));
    const r = this.settings.prettyLogTimeZone === "UTC" ? i?.date : new Date(i?.date?.getTime() - i?.date?.getTimezoneOffset() * 6e4);
    n.rawIsoStr = r?.toISOString(), n.dateIsoStr = r?.toISOString().replace("T", " ").replace("Z", ""), n.logLevelName = i?.logLevelName, n.fileNameWithLine = i?.path?.fileNameWithLine ?? "", n.filePathWithLine = i?.path?.filePathWithLine ?? "", n.fullFilePath = i?.path?.fullFilePath ?? "";
    let a = this.settings.parentNames?.join(this.settings.prettyErrorParentNamesSeparator);
    return a = a != null && i?.name != null ? a + this.settings.prettyErrorParentNamesSeparator : void 0, n.name = i?.name != null || a != null ? (a ?? "") + i?.name : "", n.nameWithDelimiterPrefix = n.name.length > 0 ? this.settings.prettyErrorLoggerNameDelimiter + n.name : "", n.nameWithDelimiterSuffix = n.name.length > 0 ? n.name + this.settings.prettyErrorLoggerNameDelimiter : "", this.settings.overwrite?.addPlaceholders != null && this.settings.overwrite?.addPlaceholders(i, n), Tt(this.settings, t, n);
  }
}
class No extends Ro {
  constructor(i, t) {
    const n = typeof window < "u" && typeof document < "u", r = n ? window.chrome !== void 0 && window.CSS !== void 0 && window.CSS.supports("color", "green") : !1, a = n ? /^((?!chrome|android).)*safari/i.test(navigator.userAgent) : !1;
    i = i || {}, i.stylePrettyLogs = i.stylePrettyLogs && n && !r ? !1 : i.stylePrettyLogs, super(i, t, a ? 4 : 5);
  }
  log(i, t, ...n) {
    return super.log(i, t, ...n);
  }
  silly(...i) {
    return super.log(0, "SILLY", ...i);
  }
  trace(...i) {
    return super.log(1, "TRACE", ...i);
  }
  debug(...i) {
    return super.log(2, "DEBUG", ...i);
  }
  info(...i) {
    return super.log(3, "INFO", ...i);
  }
  warn(...i) {
    return super.log(4, "WARN", ...i);
  }
  error(...i) {
    return super.log(5, "ERROR", ...i);
  }
  fatal(...i) {
    return super.log(6, "FATAL", ...i);
  }
  getSubLogger(i, t) {
    return super.getSubLogger(i, t);
  }
}
class Io {
  constructor(i, t) {
    Y(this, "_logger");
    Y(this, "logTotalArr");
    Y(this, "params");
    Y(this, "configParams");
    Y(this, "lastUploadTime");
    Y(this, "retryCount");
    Y(this, "isUploadBaseInfo");
    if (!i)
      throw new Error("项目标识为必填项");
    if (!t.userId)
      throw new Error("用户Id为必填项");
    this._logger = new No({
      name: i,
      hideLogPositionForProduction: !0,
      // 优化日志性能
      stylePrettyLogs: !0,
      prettyLogTimeZone: "local"
      //日志输出的时区与本地时区一致  UTC时区和本地差8
    }), this.logTotalArr = [], this.params = t, this.configParams = {
      name: i,
      //产品标识
      userId: this.params.userId,
      //用户唯一标识
      maxCount: this.params.maxCount || 20,
      //最大日志数量
      maxInterTime: this.params.maxInterTime || 1e3 * 60,
      //最大间隔时间(毫秒)
      needUpload: this.params.needUpload || !1,
      //是否需要上传
      uploadUrl: this.params.uploadUrl
      //上传地址
    }, this.lastUploadTime = (/* @__PURE__ */ new Date()).getTime(), this.retryCount = 0, this.isUploadBaseInfo = !1;
    const n = {
      name: "项目基础信息",
      userId: this.configParams.userId,
      content: JSON.stringify({
        name: i,
        //项目唯一标识
        browerType: navigator.userAgent,
        deviceType: this.getDeviceType()
      })
    };
    this.isUploadBaseInfo || (this.logTotalArr.push(n), this.isUploadBaseInfo = !0), this.startUploadTimer(), this._logger.attachTransport((r) => {
      const { logLevelName: a, date: s } = r._meta;
      let l = {
        userId: this.params.userId,
        name: this.configParams.name,
        level: a,
        date: this.timeFormat(s),
        content: this.concatenateValues(r)
      };
      this.logTotalArr.push(l), this.checkAndUploadLogs();
    });
  }
  //1 minute定时器
  startUploadTimer() {
    setTimeout(() => {
      this.logTotalArr.length && this.checkAndUploadLogs(), this.startUploadTimer();
    }, 1e3 * 60);
  }
  //获取设备类型
  getDeviceType() {
    const i = navigator.userAgent;
    let t = i.indexOf("Android") > -1 || i.indexOf("Adr") > -1;
    return i.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) ? "ios" : t ? "android" : "PC";
  }
  //检查是否达到了日志上传的条件
  checkAndUploadLogs() {
    (this.logTotalArr.length >= this.configParams.maxCount || (/* @__PURE__ */ new Date()).getTime() - this.lastUploadTime >= this.configParams.maxInterTime) && (this.configParams.needUpload ? this.compressIntoGzip(this.logTotalArr) : this.saveLogsToLocal(this.logTotalArr), this.logTotalArr = [], this.lastUploadTime = (/* @__PURE__ */ new Date()).getTime());
  }
  //压缩成gzip
  compressIntoGzip(i) {
    const t = uo.gzip(JSON.stringify(i)), n = new Blob([t], { type: "application/gzip" });
    n.size / 1024 / 1024 > 2 ? alert("请合理设置最大日志上传数量") : this.uploadLogToserver(n);
  }
  //调用后台接口上传日志
  uploadLogToserver(i) {
    let t = new XMLHttpRequest();
    t.open("POST", `${this.configParams.uploadUrl}`, !0), t.setRequestHeader("Content-Type", "application/gzip"), t.send(i), t.onreadystatechange = () => {
      if (t.readyState == 4)
        if (t.status == 200)
          try {
            const n = JSON.parse(t.responseText);
            n.code == 0 ? console.log("成功") : alert(n.message);
          } catch (n) {
            console.error(n);
          }
        else
          this.retryCount < 1 ? this.reTryUpload(i) : this.retryCount = 0;
    };
  }
  //尝试请求一次
  reTryUpload(i) {
    this.retryCount++, this.uploadLogToserver(i);
  }
  //时间格式转换
  timeFormat(i) {
    const t = new Date(i), n = t.getFullYear();
    let r = t.getMonth() + 1;
    r < 10 && (r = +("0" + r));
    let a = t.getDate() < 10 ? "0" + t.getDate() : t.getDate(), s = t.getHours() < 10 ? "0" + t.getHours() : t.getHours(), l = t.getMinutes() < 10 ? "0" + t.getMinutes() : t.getMinutes(), h = t.getSeconds() < 10 ? "0" + t.getSeconds() : t.getSeconds();
    return `${n}-${r}-${a} ${s}:${l}:${h}`;
  }
  //content格式转换
  concatenateValues(i) {
    let t = "";
    for (const n in i)
      if (i.hasOwnProperty(n)) {
        const r = i[n], a = typeof r == "object" && r !== null ? ` ${JSON.stringify(r)} ` : r;
        t += a + " ";
      }
    return t.trim();
  }
  // 保存到本地
  saveLogsToLocal(i) {
    const t = JSON.stringify(i), n = new Blob([t], { type: "text/plain;charset=utf-8" }), r = URL.createObjectURL(n), a = document.createElement("a");
    a.href = r, a.download = "logs.txt", document.body.appendChild(a), a.click(), document.body.removeChild(a);
  }
  silly(...i) {
    this._logger.silly(...i);
  }
  trace(...i) {
    this._logger.trace(...i);
  }
  debug(...i) {
    this._logger.debug(...i);
  }
  info(...i) {
    this._logger.info(...i);
  }
  warn(...i) {
    this._logger.warn(...i);
  }
  error(...i) {
    this._logger.error(...i);
  }
  fatal(...i) {
    this._logger.fatal(...i);
  }
  //主动触发上传
  activeUpload() {
    this.logTotalArr.length && (this.compressIntoGzip(this.logTotalArr), this.logTotalArr = []);
  }
}
export {
  Io as default
};
